Since it has an empty dependency array, it is preserved for the full lifetime of the component. At lines 8-14, debounceHandler is the memoized debounce function by useMemo. Line 20 initializes useThrottledValue. Ask Question Asked 4 years, 5 months ago. Thanks for reading, I hope it was helpful. debounceHandler is used by line 33 to update the value. They do, however, require a different mental model, especially for first-timers.. The returned object will persist for the full lifetime of the component. The 3 implementations are a bit different internally, but their interface is almost identical. There is no need to install it at all. Can be used as drop-in replacement for or