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
innerRef support for withTheme() HOC #591
Comments
|
@evan-scott-zocdoc Just to make sure... This is the current output:
and you were expecting this:
Is that correct? |
Yes that's correct.
|
I don't think it's related to -const ThemedChild = withTheme(Child);`
+const ThemedChild = styled(Child)``; The output will be all |
Ah the example should probably be tweaked, as you can't take a |
@brunolemos updated the example, your change will now reflect |
This should definitely be fixed! Thanks for the reproduction. |
This PR should fix this 😄 #710 |
Woot! |
All done 😸 |
I'm seeing this behaviour again with SC 3.2.5 (https://codesandbox.io/s/056wj1zmw), possibly because of #1414 ? Or am I doing something wrong here? I can't access the bin in OP to compare the code. |
@denkristoffer That happens because your Btw it's not preferable to post comments on closed/stale/old issues (this issue is all of those three things 😅) It's easier to create a new issue or ask for help on Spectrum |
Version
1.4.4
Reproduction
https://www.webpackbin.com/bins/-KfSbgVyPqFmY7yJYVj0
Steps to reproduce
Style a
withTheme()
-wrapped component and try to use theinnerRef
callback to grab the wrapped component instance.Expected Behavior
I would expect the
innerRef
callback to resolve to the deeply nested child.Actual Behavior
The
withTheme
HOC instance is returned byinnerRef()
and there's no way to get the wrapped child component.The text was updated successfully, but these errors were encountered: