BFE.dev
React Coding Questions5. usePrevious()

5. usePrevious()

ReactHooks
Share

  - accepted / - tried

Create a hook usePrevious() to return the previous value, with initial previous value of undefined.

prevnext

Think about the edge cases.

SolutionAIPosts(124)

Try it out

Console