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
[v4.0.0] Usage of withTheme and redux-connect breaks the code. (or just using of withTheme) #2106
Comments
Maybe connected with #2103 |
Can you repro on codesandbox.io? Are you on the latest version of redux and react-redux? |
@mxstbr sry. Too busy now at work. Maybe tmrw. If it will not be moving any forward will repro all the env thanks to |
@mxstbr Here a codesandbox: https://codesandbox.io/s/54v5yy621l |
Maybe react-redux doesn't expect forwardRef-wrapped components? |
Same problem here, I have a component similar to: const Component = () => <div>Hello world</div>
const StyledComponent = styled(Component)`
//css here
`
const mapStateToProps = () => {}
export default connect(mapStateToProps)(StyledComponent) And i'm getting the message |
This is an issue in react-redux: https://github.com/reduxjs/react-redux/blob/dde1a0a11dbb093f718757409b357cd04c9790e3/src/components/connectAdvanced.js#L90-L94 They need to support forwardRef-wrapped components. cc @timdorr |
Yep, we know: reduxjs/react-redux#914 |
Closing as there's nothing we can do to fix this. |
Environment
System:
Binaries:
npmPackages:
Reproduction
Steps to reproduce
withTheme
HoC to gettheme
redux
connect
function.Expected Behavior
You get
theme
andconnect
is happy too. Everything is working nicely.Actual Behavior
You've got an error.
Other notes and hints:
It works no problem in version >3.4
I have latest babel plugin, latest CRA 2 with some hacks to add this babel-plugin to it.
As well as the
@babel/typescript-preset
.This component is
tsx
hence written in Typescript and gets compiled down by Babel, nottsc
What can be the issue? I have no idea, but it's clearly connected with bumping to the v4.
The text was updated successfully, but these errors were encountered: