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

Incorrect initial loading of values

cireix opened this issue · comments

Initial values should be the same as what is inputted.

VSCode:
image

Rendered:
image

The rendered translateY value should be the same as the start value of translateY in the code.

Are you able to provide a link to your site or a demo of the behavior? It would be helpful in determining the cause of this behavior.

I'll see if I can create a reproduction of this in a sandbox.

Not sure how to reproduce this -- here's my attempt based on the setup you have, but everything looks normal to me.

Here's a playground to work with.

If you inspect the initial rendered page, you can see that the translateY value is inconsistent with what is coded.
image

Thank you for helping.

Thanks! that helps. I see the issue now and have an idea of what may be causing it. I will look into it and see if I can get a fix out soon.

Published a fix in the dependency. You should be able to see the fix in v3.0.5. Example: https://nujwyi.csb.app/

Let me know if you have any trouble.

Thanks for the quick fix!