@hooks/previous
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

🎒 @hooks/previous

React hook to remember a value between renders

NPM version Travis License

Install

npm i @hooks/previous

Usage

usePrevious

usePrevious(value: T): T

Parameters

value: T

The value to be returned on the next render.

Return

Returns the last value, undefined for initial render.

Package Sidebar

Install

npm i @hooks/previous

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

2.93 kB

Total Files

6

Last publish

Collaborators

  • simmo