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

Support React.forwardRef in matchElement #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kachkaev
Copy link
Contributor

After upgrading to styled-components v4 I noticed dev mode warnings just as before #56. The cause of this was that a styled-component is now create using React.forwardRef and this is no longer matched by PropTypes.oneOfType([PropTypes.string, PropTypes.func]).

There's currently no way to properly check against forwardRef prop-type, see facebook/prop-types#200 for details.

This PR implements a temporary workaround similar to algolia/react-instantsearch#1461. With this change, a warning disappears in my locally opened project.

This is a temporary solution, see facebook/prop-types#200 for details.
@kachkaev
Copy link
Contributor Author

@helior 👋

@kachkaev
Copy link
Contributor Author

ping 🙂

@kachkaev
Copy link
Contributor Author

👋 @helior

@kachkaev
Copy link
Contributor Author

👋 @helior 😅

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.

None yet

1 participant