Skip to content
zenui/react-hooks

usePrevious

Return the value a variable had on the previous render. Use it to compare old and new props or state, for example to show whether a number went up or down.

Level
Basic
Since
v1.0.0
import {usePrevious} from '@zenuilabs/react-hooks';
Loading demo_

More in State