Summary
The useDebounce hook sets a timeout that must be cleared when the component unmounts to avoid state updates on an unmounted component. An integration test should confirm the timeout is cleaned up correctly.
Scope
- Render a component using
useDebounce and trigger a value change
- Unmount the component before the debounce delay elapses
- Assert no state update or warning occurs after unmount
- Use fake timers to advance past the delay after unmount and confirm no update fires
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
The
useDebouncehook sets a timeout that must be cleared when the component unmounts to avoid state updates on an unmounted component. An integration test should confirm the timeout is cleaned up correctly.Scope
useDebounceand trigger a value changeAcceptance Criteria
ETA: 12 hours
Coordinate on Telegram