ReactJS use requestAnimationFrame to debounce on scroll or resize events worth it? -


is worth use requestanimationframe debounce scroll or resize events if using reactjs dom update.

i have overall immutable object going update based on scroll or resize event changes , have reactjs update dom if needed.

i tried exact same thing , wasn't able glean performance out of it. instead, absolute best performance came using twitter approach check every 300ms rather binding scroll/resize events.

anytime bind scroll/resize events, many browsers slow down lot, if you're not doing much. in situation, lazily loading images, works way better.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -