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

Always try to find a better approach.

SolutionAIPosts(140)

Try it out

Console