- ## usePrevValue ``` import React, { useState } from "react"; import { usePrevValue } from "use-utils"; function App() { const [count, setCount] = useState(1); const prevCount = usePrevValue(count); return (

usePrevValue

currentCount: {count}


prevCount: {prevCount ? prevCount : "-"}

); } ``` #### signature ``` usePrevValue(value) -> returns: previous value arguments: value: required (default: undefined) ``` #### note ``` You don't get access to previous value in first render (as there is no value in first render). just like you don't have access to prevProps/prevState in first render. ```