Debounced search input hook
You need a `useDebouncedValue` React hook in TypeScript for a search-as-you-type input, so the API only fires after the user pauses typing. You'll delegate it to an AI agent. Write the prompt/spec — constraints, edge cases, acceptance criteria — that makes it correct on the first try. What does a lazy prompt ("make a debounce hook") typically get wrong in React specifically?
Implement
debounce_emissions(event_times: list[int], event_values: list[str], delay_ms: int, unmount_time: int) → list[str]Examples
in
[[0,100,150,200],["","a","ab","abc"],300,10000]out["","abc"]in
[[0,100,600],["","a","ab"],300,10000]out["","a","ab"]What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
0:00 of about 12 min
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.