BFE.dev
React Coding Questions2. useTimeout()

2. useTimeout()

ReactHooks TikTok
Share

  - accepted / - tried

Create a hook to easily use setTimeout(callback, delay).

  1. reset the timer if delay changes
  2. DO NOT reset the timer if only callback changes
prevnext

Always try to find a better approach.

SolutionAIVideos(2)Posts(161)

Try it out

Console