Hooks
usePreviousValues

Import this in your client-side component

MyComponent.tsx
import { usePreviousValues } from "react-amazing-hooks";

API

ApiDescriptionTypeReturn TypeExample
usePreviousValuesA hook to store previous values with a limit.UsePreviousValuesOptionsUsePreviousValuesResultNote *

Check the UsePreviousValuesOptions and UsePreviousValuesResult in the 'Types' tab.

Check the 'Example' tab above the table for an exhaustive example. *