Hi guys,
I'm trying to have a map component that I can update with different maps from a call to an API that return a JSON file,
for now I'm struggling with the update of the map, let me explain:
-The map data is from a file that I've downloaded and imported in my project, for now I only want to have two buttons, one that inserts the data of the map into the specified path and another one for cleaning it.
If I console.log the path the function to insert the data works and also the one to clear it but no maps are viewed.
If I directly put the file in the properties of the component without using the state the map is visualized so there is no problem with the file.
Any help would be appreciated!
Here's my code on stackblitz:
https://stackblitz.com/edit/react-by7qq ... src/App.js