Skip to content

ChoroplethCanvas: Failed prop type / required properties (v0.87.0) #2634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Utomik-Mark opened this issue Aug 14, 2024 · 4 comments
Open

Comments

@Utomik-Mark
Copy link

Failed prop type / required properties
When adding the ChoroplethCanvas, a lot of properties which are not required still need to be set to prevent warnings in the console log of the browser. After setting these properties, there are a few which keep being a problem;

  • layers
  • match
  • value

Layers can be set, but when doing so results in a typescript warning, the other two I cannot find how to set.

To Reproduce
The already existing codebox showcases the issue (I cannot find for which issue this one is made).
I also created one in which all 'optional' properties are set anyway:
codesandbox. Leaving the three properties I don't see how to fix.

Steps to reproduce the behavior:

  1. Go to the codebox
  2. Press ctrl-shift-i to show the console log (in chrome)
  3. See warnings & errors

Expected behavior
No warnings on optional properties.

Console log

console.js:288 Warning: Failed prop type: The prop layers is marked as required in ChoroplethCanvas, but its value is undefined.
at http://localhost:5173/node_modules/.vite/deps/@nivo_geo.js?v=4632f29a:2281:15
at i3 (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:13099:17)
at div
at It (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:12942:15)
at Ce
at div
at GeoChart

console.js:288 Warning: Failed prop type: The prop match is marked as required in ChoroplethCanvas, but its value is undefined.
at http://localhost:5173/node_modules/.vite/deps/@nivo_geo.js?v=4632f29a:2281:15
at i3 (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:13099:17)
at div
at It (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:12942:15)
at Ce
at div
at GeoChart

Warning: Failed prop type: The prop value is marked as required in ChoroplethCanvas, but its value is undefined.
at http://localhost:5173/node_modules/.vite/deps/@nivo_geo.js?v=4632f29a:2281:15
at i3 (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:13099:17)
at div
at It (http://localhost:5173/node_modules/.vite/deps/chunk-KMN5BT75.js?v=4632f29a:12942:15)
at Ce
at div
at GeoChart

FYI nice work with nico.rocks!

@Utomik-Mark Utomik-Mark changed the title ChoroplethCanvas: Failed prop type / required properties ChoroplethCanvas: Failed prop type / required properties (v0.87.0) Aug 14, 2024
Copy link

stale bot commented Jan 31, 2025

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Jan 31, 2025
@dipanshu914
Copy link

bump

@dipanshu914
Copy link

I am using @nivo/geo": "^0.88.0", and it creating issue in many default value's ,, here is a error in console look like

  • hook.js:608 Warning: Failed prop type: The prop value is marked as required in Choropleth, but its value is undefined.
  • and many more warning showing like that

@plouc
Copy link
Owner

plouc commented Feb 12, 2025

I'll remove the prop-types validation entirely when I can as it's been deprecated in recent versions of React in favor of typings.

@stale stale bot removed the stale label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants