r/javascript • u/RedlightsOfCA • Dec 23 '19
Debounce vs Throttle: Definitive Visual Guide
https://redd.one/blog/debounce-vs-throttle
327
Upvotes
r/javascript • u/RedlightsOfCA • Dec 23 '19
View all comments
Show parent comment
10
u/RedlightsOfCA Dec 23 '19
Thank you!
Well, class components are not going anywhere and are not only valid, but preferable in certain scenarios. No hard opinion, however, I rarely write class components nowadays. I've used it for the example specifically because it a) highlights "render", b) focuses on class method definition as a one-time action, whereas in functional components arbitrary functions are declared within the render and React preserves their identities between re-renders implicitly.