usePrevious
Returns previous value of given state.
Installation
Install the custom hook from your command line.
npm i @raddix/use-previous
Usage
API
Parameters
| Name | Description | Required | Type |
|---|---|---|---|
| value | The value of the state. | Yes | any |
Returns
| Name | Description | Type |
|---|---|---|
| previousValue | The previous value of given state. | any |