Detalhes do pacote

@spellix/use-previous

Spellix133.0.5

The hook returns previous value that was passed in the place where the hook was used.

react, hook, use-previous

readme (leia-me)

@spellix/use-previous

A Quick description of the hook

This hook is generated automatically, please add a description and usage instructions below.

Short description

The hook returns previous value that was passed in the place where the hook was used.

Installation

yarn add @spellix/use-previous
# or
npm i @spellix/use-previous
# or
pnpm i @spellix/use-previous

Usage

Import usePrevious from the package and configure it with props as needed:

import { usePrevious } from '@spellix/use-previous';

export const App = () => {
  const { /* hook return values */ } = usePrevious({/* hook arguments */});

  return (
    <>
      {/* component */}
    </>
  );
};