Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49416

Prevent to refresh tab with leaflet map in tabbed react app

$
0
0

Hello everyone I am kind of new in react/ionic and I writing tab app with ionic/react with this version.

Ionic Framework : @ionic/react 5.2.2

As for the title I am writing an app using the ionic template tabbed app.
One of the tabs contain a leaflet map and all the time that I switch between tabs , the maps get reloaded.
I understand that this is the classic behaviour from ionic/react, but I would like to keep the map from being destroied and rendered again.
Also because I am trying to draw the route from point A to point B in the maps, so I want to avoid unuseful call to leaflet and draw all the route slowing down the render.
How I can achieve this ?
The map component is a functional component, which wait for the coordinates returned from a module outside of this component.
If you need to see the code, or any other information let me know :slight_smile:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>