usePreviousValue
Tracks and returns the previous value of a prop or state.
Tracks and returns the value from the previous render. Useful for comparing current and previous values to trigger transitions or conditional logic.
Import#
import { usePreviousValue } from '@volue/wave-react';
Example#
API Reference#
Arguments#
Prop | Type | Default |
|---|---|---|
value* | T | — |
Returns#
T