Animate on scroll
hi i am trying to make animations on scroll in solidjs without a component wrapper, just passing the class as identificator and add the class to animate, but the observer is not working in solidjs, how do you guys make this, please, without ref or wrapper
1 Reply
You can only select what is mounted. You could use a directive, like this makeIntersectionObserver example: https://github.com/solidjs-community/solid-primitives/tree/main/packages/intersection-observer
Or handle the animate call in an onMount().
GitHub
solid-primitives/packages/intersection-observer at main · solidjs-c...
A library of high-quality primitives that extend SolidJS reactivity. - solid-primitives/packages/intersection-observer at main · solidjs-community/solid-primitives