react-simple-maps
react-simple-maps copied to clipboard
In > v1.0 how to dynamically fill countries in when clicked?
How can you make the maps update when props are passed into them? I was looking through the examples of the older version of react-simple-maps and I saw that you can pass the disableOptimization flag into the Geographies component to allow updating the fill of different countries when clicked and an external state passes props into the map.
Since disableOptimization flag has been deprecated, what's the most up to date way of doing this? I have been able to use the map chart with texture example to shade a country but if I store the selected countries in a hook outside of the ComposableMap component, I never will receive updated props even as I add selected countries to the hook and pass it in.