Import this in your client-side component
MyComponent.tsx
import { usePreviousValues } from "react-amazing-hooks";
API
Api | Description | Type | Return Type | Example |
---|---|---|---|---|
usePreviousValues | A hook to store previous values with a limit. | UsePreviousValuesOptions | UsePreviousValuesResult | Note * |
Check the UsePreviousValuesOptions
and UsePreviousValuesResult
in the 'Types' tab.
Check the 'Example' tab above the table for an exhaustive example. *