Skip to content
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

react-json-tree: PropTypes validation for value is wrong #487

Closed
nmain opened this issue Sep 27, 2019 · 0 comments · Fixed by #513
Closed

react-json-tree: PropTypes validation for value is wrong #487

nmain opened this issue Sep 27, 2019 · 0 comments · Fixed by #513

Comments

@nmain
Copy link

nmain commented Sep 27, 2019

JSONTree requires that the value passed be an object or array:

data: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired

But this is not true for JSON in general, where the top level value could be a number, string, boolean, or null. The component seems to work fine when I pass it one of those, so I think the PropTypes is simply wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants