-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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
ReactTestUtils.isCompositeComponent (called by scry*) throws on stateless components #4882
Comments
Stateless components have no public instance (return value of |
@jimfb I am having the same issue with const StatelessComponent = () => <div>foo</div>
const Wrap = class Wrap extends React.Component {
render () {
return <StatelessComponent />
}
} but then calling const component = renderIntoDocument(<Wrap />)
const div = scryRenderedDOMComponentsWithTag(component, 'div') produce this error:
Did I misunderstood what "wrap it in another (stateful) composite" means? Thanks! |
@happypoulp That might just be a different issue. Can you open it separately? |
Actually never mind we can use this one. |
Example:
This works with
Component2
but not withComponent1
.The text was updated successfully, but these errors were encountered: