Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 195 Bytes

use-previous.md

File metadata and controls

11 lines (7 loc) · 195 Bytes

usePrevious

Tracks the value of the given argument from a previous render and returns it.

Example

const [state, setState] = useState();

const previousState = usePrevious();