Most basic example won't work on latest version
See original GitHub issueHello,
I wanna use react-simple-maps
with Typescript.
Since types are defined for 0.12+ versions only I am forced to use the latest versions of the library (0.12.1). Trying to do so results in an error, presumably because the render props passed by Geographies
has changed.
Trying to console.log those props returned an empty array.
Please see this example: https://codesandbox.io/s/basic-map-s4cdv?fontsize=14&hidenavigation=1&theme=dark
Note that the only difference from the original example is the version specified in package.json.
I couldn’t find any explanation about the latest version and how to use it on the website/docs.
Thank you.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Windows 10 Troubleshooting: The Most Common Problems ...
Issues updating to the latest version of Windows 10 · Not enough storage space to complete an update · Mouse cursor starts moving...
Read more >Fix program errors and improve code - Visual Studio (Windows)
This article describes some basic ways Visual Studio can help you find and fix problems in your code, including build errors, code analysis, ......
Read more >Best practices for writing Dockerfiles - Docker Documentation
Best practices for writing Dockerfiles. This document covers recommended best practices and methods for building efficient images.
Read more >Unable to Install Apps or Software on Windows? Here's What ...
If you're unable to install software on Windows 10 or Windows 11, here's how to fix common app installation problems.
Read more >10 Common WordPress Theme Issues & How To Fix Them
Common WordPress errors with solutions. We address some of the most common WordPress theme issues and provide easy solutions to fix them.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s cool @Amiryy,
If you are using v1, the
disableOptimization
prop is no longer in use. It was a bit of a confusing feature of rsm that has been solved differently in v1, so the prop has been retired.Hi @Amiryy,
The documentation as well as all the old examples are still available in the repo under the
v0.12.x
branch.There is one additional change in the API from v0.12 to v1, and that is that v0.12 returns the geographies, and v1 returns an object, which contains geographies, projection, and path. so the difference is that in v1 you can use destructuring to get the geographies, and in v0.12 you just get the geographies directly. Note that v0.12 also does not have an
rsmKey
for the geographies, so you will have to make a unique id (based off iso code, or something else unique for every country).Hope this helps.