-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
Getting at the wrapped React component when exporting withStyles #10106
Comments
@snydersaurus <MyComponent innerRef={node => this.myComponent = node} /> Edit for v4: this workaround is no longer needed. You can simply provide a |
Thank you @oliviertassinari. I saw that |
@oliviertassinari I assume that the |
@rolandjitsu Why wouldn't it work? It should. |
Because if I follow the example illustrated at createref-api and replace
|
@rolandjitsu Aside from the PropType we need to fix. Does the feature work? |
@oliviertassinari yes it does 😄 |
@rolandjitsu Do you want to update the propTypes? :) |
sure thing 😄 |
damn it i spend 2 hrs trying to figure out what the problem... I think this should used as disclaimer instead ;). Love the work you guys are putting in |
@DarkKnight1992 We have started using the |
Is there an example somewhere of how the |
There is currently no ref forwarding happening. We have started the effort for some components with #13722 but some dependencies are currently blocking us. |
I tried using:
But I got the following error:
I removed the createRef() usage, as it is not yet usable (any ETA?), but even the old pattern doesn't seem to work. The goal was to get some values from a function triggered by a . Is tehre another pattern that I'm supposed to follow instead of using refs to get these values (and then use them in a backend request)? |
Hi Roland, seems like there is still something missing, see my previous comment. |
@mbrucher can you create a new issue with a reproduction please :) |
thank you |
Is it possible to get at the React class wrapped by WithStyles?
Context: getting the ref to a child component e.g.
<MyComponent ref="myComponent"></MyComponent>
Trying to reference
this.refs.myComponent
gives me aWithStyles
object obviously and not aMyComponent
object.The text was updated successfully, but these errors were encountered: