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

Invalid prop className of type array supplied to Col, expected string #1596

Open
Gsiete opened this issue Aug 3, 2019 · 0 comments
Open

Comments

@Gsiete
Copy link

Gsiete commented Aug 3, 2019

What is happening?

Since I realized that Reactstrap is already using classnames to handle className I started passing arrays directly the console.error below (hopefully soon it'll be a console.warn: facebook/prop-types#245)
I could of course call classnames my self, but it feels like it's not the best thing to do performance-wise (even though it's probably exactly what classnames will do with my array).
Of course, I understand that this would kind of bind the library to accepting class arrays, or at least bind it more...
Well, my point is, does anyone else think it'd be a good idea to allow also arrays and objects in the propTypes?

Error message in console

Failed prop type: Invalid prop `className` of type `array` supplied to `Col`, expected `string`
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

1 participant