They are shown when you run the tests. Until then they appear as a hidden requirement.
Create the useDebounce(value, delay) hook that delays a value until it stops changing. You practice effects with useEffect and their cleanup function.
useDebounce and the export: the tests exercise the hook through a test component.value changes, the returned value stays the previous one until delay milliseconds pass.delay, the hook returns the new value."a" → the hook returns "a" instantly."b" with a delay of 500 → for 500 ms it keeps returning "a"."b".Store the delayed value in useState, starting with the initial value.
A useEffect that depends on value and delay can schedule a setTimeout.
The function the effect returns is the place to call clearTimeout.
useEffect with dependencies.clearTimeout).The console is empty
Run your code with Ctrl+S
This console starts empty every time the preview loads. The browser's DevTools console keeps the messages with Preserve log.