Closed ximudada1996 closed 2 years ago
@ximudada1996 is "smooth-scroll" an NPM package you're trying to use? Can you elaborate on this more? Maybe provide a demo in CodeSandbox
Not sure how to help without more information.
@jscottsmith I wrote an example using codesandbox to restore the scene with and without react-parallax-scroll, you can check the link to see the situation. Thanks~
Codesandbox:https://codesandbox.io/s/react-parallax-with-smooth-scroll-w7sm4v?file=/src/App.js
I understand now, thank you for the reproduction
I don't see any way that I can support this as react-scroll-parallax
relies entirely on native scrolling events and the smooth-scrollbar
package implements its own scroll management with transforms like you said. They are entirely incompatible as far as I can tell.
Perhaps there's a smooth scroll solution that uses native scrolling views -- however I'm not aware of such packages.
Feel free to post any solutions for others if you find such a package.
Support
At present, it cannot be used with functions such as smooth-scroll, perhaps because the former uses translate3D to control the scrolling of the canvas, so react-parallax-scroll cannot be recognized, and functions can be added to help windows users achieve smooth scrolling to improve user experience ?