reearth / resium

React components for 🌏 Cesium
https://resium.reearth.io
MIT License
747 stars 135 forks source link

Viewer Render problem #647

Closed mhmtyasr closed 11 months ago

mhmtyasr commented 12 months ago

Viewer is adding the map to the screen twice, what is the reason? Ekran görüntüsü 2023-12-01 130225 Ekran görüntüsü 2023-12-01 130337s

densgidley commented 12 months ago

This is caused by Vite hot reloading module. For some odd reason, Vite still injects HMR code into the site even with it disabled.

I haven't able to find a temporary fix for this yet...

wxmann commented 11 months ago

Try disabling React strict mode.

mhmtyasr commented 11 months ago

its working thank you :) @wxmann

Skippou commented 11 months ago

Disabling React strict mode should not be the solution, especially for Resium.

From the docs: "<StrictMode> lets you find common bugs in your components early during development."

@wxmann @mhmtyasr

olivermt commented 8 months ago

Could we maybe get this issue reopened? I have the same issue.

image

Should maybe update the text here if it is indeed Vite HMR that causes this 😅 StrictMode is made specifically to catch stuff like this, so disabling it is like saying to just delete your test if it fails.