breadadams / scroller-motion

🛹 Elegant motion scrolling for React
https://scroller-motion.js.org
MIT License
67 stars 5 forks source link

useViewportScroll has been depreciated #27

Closed MrUltimate closed 2 years ago

MrUltimate commented 2 years ago

https://github.com/framer/motion/blob/main/CHANGELOG.md#deprecated

breadadams commented 2 years ago

Thanks for notifying @MrUltimate, I'll try and add support for v6.5.0 in the following days 👍

MrUltimate commented 2 years ago

Hey @breadadams, thanks for dealing with this so quickly! I had another question I wanted to ask you: I'm building scroll based animations that rely on scroller-motion however, disabling it for mobile unmounts it completely. Is there a better way to keep existing animations on mobile without writing all the animation logic with native scroll fallbacks?

breadadams commented 2 years ago

Np @MrUltimate!

I'm not sure I fully understand, would it be possible to provide a basic example (either a repo or a codesandbox/stackblitz style environment)?

If your animations that depend on scroller-motion are because they use the scroll position (e.g. taken from useScrollerMotion), you could probably fallback to the position from useScroll when disabling scroller-motion - but I might be misunderstanding the question.