use-state-lazyy

A hook for updating state only if the component is mounted.This one hook only updates state if the component that called this hook is mounted. This allows us to avoid memory leaks and messages like this one :Warning: Can't perform a React state update on

Browse on unpkg