Skip to content

Commit

Permalink
fix: tiny typo (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
remoun authored Oct 29, 2024
1 parent 2ba9fba commit feb230d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exercises/02.latest-ref/01.problem.ref/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function useDebounce<Callback extends (...args: Array<unknown>) => unknown>(
// 🐨 create a latest ref (via useRef and useEffect) here

// use the latest version of the callback here:
// 💰 you'll need to pass an annonymous function to debounce. Do *not*
// 💰 you'll need to pass an anonymous function to debounce. Do *not*
// simply change this to `debounce(latestCallbackRef.current, delay)`
// as that won't work. Can you think of why?
return useMemo(() => debounce(callback, delay), [callback, delay])
Expand Down

0 comments on commit feb230d

Please sign in to comment.