-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hardcode decorated component ref #35
Conversation
Is calling |
Unfortunately yes. We're using react-test-tree which wraps a component and any children in a testable interface (Essentially a page object). Not having a ref present in the component means it cannot find any children. Also, the fact that you have to call Out of all the issues I've just raised this is the only one that is completely blocking us from moving to redux 1.0. We used to use the What's your motivation behind not making the decorated component available via |
Wait wait. Redux is in no way related to React Redux. You can use |
Why not export the vanilla component then and test it directly without the HOC? I'm just trying to understand the issue better. Are you testing the whole tree instead of particular components? |
I'm OK with merging this, but let's rename |
I changed names a bit and put it in b7ef178, will release soon. Thanks for the tip. |
Awesome thanks 😄 |
Not setting the ref of the inner component makes it a pain to test through refs.
Is there any specific reason for setting the ref through
setUnderlyingRef
or could we just set the ref to a string?