0.1.3 • Published 2 years ago
@dalgu/react-utility-hooks v0.1.3
react-utility-hooks
Frequently used React Custom Hooks
Installation
npm i @dalgu/react-utility-hooks
yarn add @dalgu/react-utility-hooks
Usage
useMounted()
The useMounted()
hook returns true after the first rendering of the React component. This is a useful hook when you need to know the mounted state or devolop with Server Side Rendering(SSR).
import { useMounted } from '@dalgu/react-utility-hooks';
const UtilityHooks = () => {
const mounted = useMounted();
console.log(mounted);
return <></>;
};
export default UtilityHooks;