I am using simplemaps in a component in my react project. I have added these two scripts in index.html
<script type="text/javascript" src="map/mapdata.js"></script>
<script type="text/javascript" src="map/countrymap.js"></script>
These scripts load the map in one of my React components in the following div
<div id="map"></div>
For some reason this map only gets loaded when the div with id="map" is in DOM for the initial app mount. On switching routes (i.e. when this div with id="map" is not there in the DOM) and coming back to the same component(i.e. when this div with id="map" is again there in the DOM) I am unable to see this map unless I reload the whole app.