Documents / @faasjs/react / usePrevious
Function: usePrevious()
usePrevious<
T
>(value
):T
|undefined
Hook to store the previous value of a state or prop.
Type Parameters
• T
The type of the value.
Parameters
• value: T
The current value to be stored.
Returns
T
| undefined
- The previous value, or undefined if there is no previous value.