Menu disappearing when change screen - React JS
I'm using windy in a React application and a problem is happening:
When I open the menu to select the given type (wind, rain ...) and change the screen inside my application with it open, when I return to the windy page, all layers disappear. As in the images below:
Before change the screen inside my application:
After change the screen inside my application:
Is there any way to prevent the user from switching screens with the menu open and closing it automatically?
Or, when the windy screen exits, remove the entire script and restart it again when it enters the screen?
I am using the Map Forecast API in a local application