Custom React hook to track the mounted status of a component
This custom React hook allows you to check whether the component is still mounted before setting the state in order to avoid React state updates on unmounted components.
Tags: react, javascript, hooks