/react-utility-hooks

Frequently used React Custom Hooks

Primary LanguageTypeScriptMIT LicenseMIT

GitHub license npm version

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;

Contact

dalgudot@gmail.com


License

MIT