Debounce Functionality in React App

preview_player
Показать описание
Debounce Functionality in React App

Debounce in Vanilla Javascript

useMemo Hook

Source Code
Рекомендации по теме
Комментарии
Автор

John with another masterclass. It would be really nice if you make a typescript series

thefacelessmanwonders
Автор

@CodingAddict Hi John, I think the cleanup in the useEffect hook is redundant as the timeout is already getting cleared in the searchCocktail function. I have tested it commenting out the useEffect and putting a console log in the setTimeout fn and there was no additional logs in the console after each search.

shams_shimul
Автор

why are we clearing Timeout twice in second example?

abhisheksharmayt
Автор

Hi John, i did this course with you and i actually wanted to add the debounce because it rerenders as you type. Can you add this to your udemy course as well?

fabianpetersen