Fang Jin
Jan 1, 2021

--

Debounce is mostly demoed by an elevator door, only when there's no one coming in or out and then the door is trying to close.

I think the throttling is always confusing, a) the first implementation tries to ignore redundant events b) the second tries to persist the latest one c) but sometimes maybe we want to persist all past events. I always thought c) is the definition for throttling. But in practice i only see the first two.

--

--

Fang Jin
Fang Jin

Written by Fang Jin

Front-end Engineer, book author of “Designing React Hooks the Right Way” and "Think in Recursion"

No responses yet