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

Allow passing React components as matchElement #56

Merged
merged 2 commits into from Aug 28, 2018

Conversation

kachkaev
Copy link
Contributor

@kachkaev kachkaev commented Aug 23, 2018

This fixes a warning related to prop-types in development and closes #55.

Reference: facebook/react#5143 (comment)

typeof SomeClassBasedComponent is also a function, so we cover both functional and ’normal’ components (as well as strings such as "div"). At the same time, passing <SomeComponent /> (i.e. element instead of just component name) will still trigger a warning.

This fixes a warning related to prop-types in development
@kachkaev
Copy link
Contributor Author

kachkaev commented Aug 28, 2018

👋 @helior WDYT?

@helior helior merged commit aadf4c7 into helior:master Aug 28, 2018
@helior
Copy link
Owner

helior commented Aug 28, 2018

Thanks @kachkaev

@kachkaev
Copy link
Contributor Author

Thank you for cutting a new release – I see no PropTypes warning in 0.4.3 🎉

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

Successfully merging this pull request may close these issues.

[PropTypes] Allow React components for matchElement
2 participants