@guanghechen/react-hooks

Custom react hooks.

Usage no npm install needed!

<script type="module">
  import guanghechenReactHooks from 'https://cdn.skypack.dev/@guanghechen/react-hooks';
</script>

README

@guanghechen/react-hooks


@guanghechen/react-hooks provides some common custom react hooks.

Install

  • npm

    npm install --save @guanghechen/react-hooks
    
  • yarn

    yarn add @guanghechen/react-hooks
    

Usage

Name Description
useDeepCompareCallback Deep compare version of React.useCallback
useDeepCompareEffect Deep compare version of React.useEffect
useDeepCompareMemo Deep compare version of React.useMemo
useInterval Execute callback interval in react function components
usePreviousState Use previous state

Related