use-deep-compare-effect

  • Version 1.8.1
  • Published
  • 44.2 kB
  • 2 dependencies
  • MIT license

Install

npm i use-deep-compare-effect
yarn add use-deep-compare-effect
pnpm add use-deep-compare-effect

Overview

It's react's useEffect hook, except using deep comparison on the inputs, not reference equality

Index

Functions

function useDeepCompareEffect

useDeepCompareEffect: (
callback: EffectCallback,
dependencies: DependencyList
) => UseEffectReturn;

    function useDeepCompareEffectNoCheck

    useDeepCompareEffectNoCheck: (
    callback: EffectCallback,
    dependencies: DependencyList
    ) => UseEffectReturn;

      function useDeepCompareMemoize

      useDeepCompareMemoize: <T>(value: T) => T;
      • Parameter value

        the value to be memoized (usually a dependency list)

        Returns

        a momoized version of the value as long as it remains deeply equal

      Package Files (1)

      Dependencies (2)

      Dev Dependencies (8)

      Peer Dependencies (1)

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/use-deep-compare-effect.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/use-deep-compare-effect)
      • HTML
        <a href="https://www.jsdocs.io/package/use-deep-compare-effect"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>