Adding a useDebounce React Hook

Learn how to optimize and reduce application rerenders from React onChange events via a custom useDebounce hook.

While everything with our generic search function is working well, we can optimize how the SearchInput function calls the setSearchQuery callback.

Monitor renderings

Let’s investigate what our search function currently does by adding a console.log() call to the onChange event within SearchInput.

Get hands-on with 1400+ tech skills courses.