-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When transitioning between page components plane is mis-positioned #6
Comments
Hi @joehuggans, Route transitions are always a pain with React, I've tried a few things for now but I didn't push the experiments too far. Cheers, |
Ok, thanks. I will create a codesandbox very soon to try figure this out. |
Hey @joehuggans were you ever able to figure this out? |
Hi @MrUltimate sorry no never did figure it out, we ended up for the time being only using this plugin on pages with no scroll, the plan was to come back to this issue later. |
Hi @martinlaxenaire When I tried to take advantage of this plugin in Next.js App (v. 13, React 18) I've encountered similar problems as @joehuggans and @noelsner from issue #15 . The Plane is rendered correctly on direct URL, but after using internal navigation it's not rendered and the error below show up in the console:
I've prepared the code sandbox with simplified version of my project implementation (Plane component can be found under /theme). I found out, that there are no problems at all after disabling reactStrictMode in next.config.js, but it is not an option in my project. Did you have any change to take a look on this issue since it got raised for the first time? I would appreciate any help |
Hi @martinkosmela, I think your issue is related to the My take is that it executes the Unfortunately this was introduced in React after I first published this package, and I did not have time to look further into it since. Any suggestion / PR on how to get rid of that side effect would be appreciated. |
I'm experiencing this same issue. I can confirm I don't have StrictMode enabled... |
Follow-up: I was able to work around this by updating my plane's position in its const onRender = (plane) => {
plane.updatePosition();
}; I tried applying this to all my planes and it resolved any issues related to this, but I'm sure it isn't an ideal solution. Fingers crossed it doesn't come up as I test further. |
I am using
react-router-dom
to create various routes for page components.I have just noticed that if you transition between pages the planes on the page are out of position.
This position issue is corrected if you resize the browser window.
The text was updated successfully, but these errors were encountered: