Skip to content
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

StrictMode and Mui Dialog breaks Resium #618

Closed
Kai-W opened this issue Jul 28, 2023 · 4 comments
Closed

StrictMode and Mui Dialog breaks Resium #618

Kai-W opened this issue Jul 28, 2023 · 4 comments

Comments

@Kai-W
Copy link

Kai-W commented Jul 28, 2023

I have an app where Cesium/Resium is used to rendere 3DTilesets on an Openstreetmap in a MaterialUI Dialog. With React StrictMode enabled the first component doesn't get unmounted properly. https://codesandbox.io/p/sandbox/magical-christian-fqsxd6?file=%2Fsrc%2FApp.tsx%3A64%2C23

Inside the Dialog there are 2 instances of Cesium. First a broken one and below it is a second working Cesium instance
image

Tested on Windows with Chrome, Edge and Firefox.

Wierdly this only happens inside a Mui Dialog. Without the Dialog component Resium unmounts as expected

@Skippou
Copy link

Skippou commented Aug 16, 2023

I've updated from [email protected] to [email protected] then I get a similar issue.

In strict mode, this occurs.

I'm not using MaterialUI Dialog but a custom tailwind component with an absolute div.

@Kai-W
Copy link
Author

Kai-W commented Aug 25, 2023

i tried to reproduce the problem without Material UI:
It seems the problem occures if there is a change in the component hierarchy
https://codesandbox.io/p/sandbox/trusting-ride-v7jqxz?file=%2Fsrc%2FApp.tsx%3A87%2C22

@Kai-W
Copy link
Author

Kai-W commented May 14, 2024

The new Resium Version seems to fix the duplication bug but moving the viewer to the bounding box works for the first render but breaks after a recreation of the viewer.
https://codesandbox.io/p/devbox/elastic-thunder-wvx2n3?file=%2Fsrc%2FApp.tsx%3A20%2C

@Kai-W
Copy link
Author

Kai-W commented May 16, 2024

i opend a new issue #661 for the new Problem. The duplciate Cesium render seems to be fixed

@Kai-W Kai-W closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants