tsparticles / react

React tsParticles official component
https://particles.js.org
MIT License
407 stars 28 forks source link

Fast route changes causes component render outside #root #51

Closed shimsho closed 1 year ago

shimsho commented 1 year ago

Having an issue, using latest Vite and TSParticles. When I change routes too fast TSParticles renders outside the root. I am using particles inside a component to place it in specific divs, already using the fullscreen option and works fine until fast route changes.

I have tried creating a destroy method but it doesn't seem to be working. Here is a lightweight reproduction. Try change routes fast and you will notice it extends the height of the document.

https://codesandbox.io/p/sandbox/vigorous-austin-f34z57

matteobruni commented 1 year ago

Closing this since it's a duplicate of the Discord thread