@hooks/previous
v0.1.0
Published
React hook to remember a value between renders
Downloads
1
Readme
🎒 @hooks/previous
React hook to remember a value between renders
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.