use-next-tick

  • Version 1.1.3
  • Published
  • 10.6 kB
  • No dependencies
  • MIT license

Install

npm i use-next-tick
yarn add use-next-tick
pnpm add use-next-tick

Overview

A React hook for running callbacks after the DOM or native views have updated.

Index

Functions

function useNextTick

useNextTick: (
useEffectHook?: typeof useEffect | typeof useLayoutEffect
) => (cb: NextTickCallback) => void;

    function useNextTickLayout

    useNextTickLayout: () => (cb: NextTickCallback) => void;

      Type Aliases

      type NextTickCallback

      type NextTickCallback = () => void | Promise<void>;

        Package Files (1)

        Dependencies (0)

        No dependencies.

        Dev Dependencies (0)

        No dev dependencies.

        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-next-tick.

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