Fix ReactTestUtils.isCompositeComponent#3839
Conversation
|
No, there are also React ART Components, React Native Components etc. This is also not verifying that it is indeed a component at all, any random object or string or null would pass. The problem right now is that React DOM components are wrapped in composites. We're planning on changing that and just returning the straight up DOM node. |
fb89433 to
9bd3374
Compare
9bd3374 to
994fec4
Compare
|
Thank you for your feedback! I've fixed problems in your feedback.
Even if React DOM Components are not wrapped in composites, |
|
This PR is not fixed all issues completely and is just a workaround. |
Fixed a test case of passed null.
994fec4 to
b670ef8
Compare
|
@sebmarkbage |
|
I actually ended up fixing this in #5016 so we don't need to take this. Thanks for looking into it. |
Currentry, ReactTestUtils.isCompositeComponent returns true even if passed a DOMComponent.
This is for fixing that.
I think every Component except DOMComponent is CompositeComponent. Is it correct?