React error when component with map unmounts
I am developing an SPA react app.
in dashboard I have a component with windy map
if you change path another component will mount because of react-router and the previous(with the map) will unmount
After this action I have countless errors:
lib.js:102 Uncaught TypeError: Cannot read property 'bindFramebuffer' of null
at e.bindFramebuffer (lib.js:102)
at NewClass.updateFrame (gl-particles.js:2)
at h (gl-particles.js:6)
As I can see in this file we have an async function that never stops.
reloading page could prevent from getting these errors but after I will not have an SPA
map created with react-windy-leaflet