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
Version 7: Connected components are objects instead functions #1223
Comments
i came to report the same thing, it actually breaks react-router for anyone that hasnt made the jump to v4 |
This is because we use React.memo on the component. As a workaround, you can set the |
@timdorr We dont have any contra arguments. But it is breaking change and should be noted |
This is not a breaking change to our public APIs. As of React 16.6, special component types like I'll update the release notes accordingly, but this is an incorrect assumption on the part of the other libraries. |
We handle this correctly in React Router 5, FWIW. |
With react-redux 6 connected component was returned as function. eg:
ƒ Connect(props)
Instead version 7 returns it as object because react hooks:
{$$typeof: Symbol(react.memo), type: ƒ, compare: null, WrappedComponent: ƒ, displayName: "Connect(Component)", …}
I think this should be noted for developers with PropTypes module for type checking.
The text was updated successfully, but these errors were encountered: