jscottsmith / react-scroll-parallax

🔮 React hooks and components to create parallax scroll effects for banners, images or any other DOM elements.

Home Page:https://react-scroll-parallax.damnthat.tv/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It always run onEnter at the beginning.

CuongGuti opened this issue · comments

Bug

It always run onEnter at the beginning. Can you check please. Thank you.

Example:

useParallax({ translateX: ['-50%', '0%'], opacity: [0, 2], onEnter: () => { // always run this when init or page load.... please help me to fix. }, speed: 0, }),

Happy to help but I'll need a Codesandbox that reproduces the bug.

Fork this sandbox and demo the bug please:

https://codesandbox.io/s/react-scroll-parallax-template-x6lus4