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

CSS transforms handled by react-scroll-parallax are getting reset.

rahuuzz opened this issue · comments

Actual Behavior (bug)

state update is causing parallax to reset to initial after reaching endScroll.
An example for demo code can be found here

Expected Behavior

Expecting to prevent resetting the transformations done by react-scroll-parallax after endScroll position.

Steps to Reproduce the Problem

  1. Use the above code sandbox link. (Or create some parallax components and trigger some state update (i did it in onProgressChange))
  2. Scroll till the parallax completes ( scroll position = 460)
  3. See that the transformations are reset (on reaching scroll position 461)

Environment

  • Framework: next-js
  • Node Version: 14
  • Platform: macOS
  • Browser: Google Chrome 98.0.4758.109

Thanks for the easy reproduction -- I'll work on a fix this week.

Fix published in v3.0.4. Let me know if there's any other issue.

Tried updating to 3.0.4 still havent solved the issue. preview

ahh, remove the lockfile, the issue was in the dependency and it's probably still using the old version. https://codesandbox.io/s/vigilant-hofstadter-rhthqo?file=/package.json