Size
0.16 kb
usePrevious
Returns the previous value.
Installation
Usage
Get the previous value:
Custom isEqual
function to compare the previous and current values.
API Reference
UsePreviousOptions
The options for the usePrevious hook.
Prop | Type | Default |
---|---|---|
isEqual? | ((prev: T | undefined, next: T) => boolean) | Object.is |