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

PropTypes: More informative warning in createElementTypeChecker #7302

Closed
alexzherdev opened this issue Jul 19, 2016 · 4 comments
Closed

PropTypes: More informative warning in createElementTypeChecker #7302

alexzherdev opened this issue Jul 19, 2016 · 4 comments

Comments

@alexzherdev
Copy link
Contributor

Do you want to request a feature or report a bug?
Enhancement

What is the current behavior?
Element type checker is not as informative as the other ones.

What is the expected behavior?
It would be nice to provide the actual type of the prop passed similarly to other type checkers. I.e., instead of

Invalid prop Prop supplied to Component, expected a single ReactElement.

say

Invalid prop Prop of type type supplied to Component, expected a single ReactElement.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Seeing this on 15.2.1 but I think it's also applicable to previous versions.

I know the general intention is to move away from prop types, but if there isn't a specific reason for the current behavior I can look into making this more pretty.

@gaearon
Copy link
Collaborator

gaearon commented Jul 19, 2016

Sounds good to me.

@RaitoBezarius
Copy link
Contributor

May I take it, please? @gaearon
Except if @alexzherdev wants to tackle it, of course!

@alexzherdev
Copy link
Contributor Author

Yup, I'm on it.

On Tuesday, 19 July 2016, Ryan Lahfa notifications@github.com wrote:

May I take it, please? @gaearon https://github.com/gaearon
Except if @alexzherdev https://github.com/alexzherdev wants to tackle
it, of course!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#7302 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFuOCs7AOpRrRquzrizBFfQbfxfOY6xks5qXODYgaJpZM4JPkE3
.

@RaitoBezarius
Copy link
Contributor

@alexzherdev Awesome! 👍

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