Mateusz Burzyński
Mateusz Burzyński
This got superseded by https://github.com/emotion-js/emotion/pull/3277
We have to plan to do this in the next major version that will only be compatible with React 19 (at least that's my current line of thinking about this).
Is the core of the problem that you are facing that users get a warning about this from React?
We can't quite remove this as it would be a breaking change. I think it would be fine to make this assignment conditional though and that should largely address this...
I tried a bunch of components - both function and class ones - and I can't seem to get the warning about this from React. What am I doing wrong?...
@oliviertassinari this repro *is* using `.defaultProps` - so it's... good that you have this warning there. It might be slightly confusing that `Styled(Button)` gets printed in the warning when the...
Hmm, ok - I see the problem better now. In theory, we could detect what kind of a component we are wrapping and conditionally create a class component. But we...
As a workaround, you can use `as const` on the returned object. I suspect the reason why it fails now is that we have reordered `styled` overloads. TypeScript, currently, caches...
> Perhaps the issue can be fixed anyway with a new release as it forces code changes otherwise? 🤔 Yeah, maybe - we have to investigate this further to determine...
Yeah, I mentioned above that it's related to signature caching that happens when resolving the first overload. The fix would be to add a leading overload that would be capable...