I am wondering how to implement scroll-triggered animations in Next.Js 13 properly.
I have tried to use a scroll-triggered animation library like AOS, but in order for it to work, it needs to be initialized inside a useEffect hook, which requires client-side rendering. Now all of that would be ok, if I was only using it for one component (and only for that component declaring client-side rendering via 'use client'), but that is not an option, since I want to make AOS accessible across my whole application, so that all components and parts of the page can consume it, and that, therefore, means, if Im getting this right, that everything would use client-side rendering (since I am declaring at the root (in order to be able to use useEffect)), which is not what I want.
Is there a better way of implementing this or am I just understanding this all the wrong way? I am new to Next.Js so I'm sorry if this question is more on the 'stupid' side, but I couldn't find, or figure out an answer so I decided to ask it over here. I will be happy to hear your answers. :)