DEV Community

Discussion on: Debouncing (lodash) with React

Collapse
 
all43 profile image
Evgenii Malikov

You're missing important point - debounced function should be declared outside of functional component or with use of useMemo/useCallback hooks. Otherwise it will be overwritten on every component re-render

Collapse
 
ryskin profile image
Alexey

This comment saved me time!