DEV Community

Discussion on: Debouncing with React Hooks

Collapse
 
awlevin profile image
Aaron Levin

Hmm this doesn't seem to work if you add text after the initial query (i.e. 'wolverine' as the first full term to debounce, then appending it to become 'wolverine x-men'.. the 'x-men' part doesnt show up until the debouncing times out). I feel like this code is so short and simple I should be able to figure it out, but I can't seem to see why the UI lags so hard on the second set of characters.

Collapse
 
awlevin profile image
Aaron Levin

Aha, I take it back! Turns out I needed to pull my search input into its own component. Problem solved! (I think)