What's the best way, in your opinion, do onScroll animation in react. It looks to me that the most performant way is to get ref to a DOM node and change styles on it directly which is not the 'React way' actually (implementing of course requestAnimationFrame and stuff). Is there a good way to implement it (talking about onscroll parallax effects) through a component state and rerender (React way)?
IMO that’s exactly what refs are useful for. Pretty much what I would do, yes.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.