-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 of wrapped component leak through #435
Comments
At a first glance, isn't this just a result of using |
Yeah, as soon as I finished writing this issue, I noticed the root of the issue. The ES7 class properties are not applied to |
So I just have to apply Will close this issue since it is not related to this project in any way. |
It might be worth documenting this in the react-redux docs though. |
FYI: There seems to be an ticket for the issue regarding these two babel plugins. |
Adds react-redux-starter-kit to examples
Suppose the following simple and common example:
So
<Foobar/>
needsname
,age
anddispatch
whereasage
anddispatch
are provided via the@connect
HOC. But when I render the component as one would exepect withI get warnings from React, saying that
Connect(Foobar)
is missing the required propsage
anddispatch
, even though<Foobar/>
itself never get rendered without these props (so from<Foobar/>
's point of view everything is fine). To work around this I have two bad options:age
anddispatch
non required or<Foobar/>
resp.<Connect(Foobar)/>
with dummy values forage
anddispatch
.The warning is strange by itself anyway, because looking at the code I see
And I also checked that the
.propTypes
of the returned HOC only contain thestore
props. Still I keep getting this warnings.Btw, I am using the following versions:
Thanks for your help.
The text was updated successfully, but these errors were encountered: