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
Post a Comment