Describe the bug
When rendering a Provider and its Consumer directly (with no surrounding elements), a propType warning gets emitted.
To Reproduce
Steps to reproduce the behavior:
import React from 'react';
import ReactDOM from 'react-dom';
import { mount } from 'enzyme';
const { Provider, Consumer } = React.createContext();
const element = (
<Provider value="hello world">
<Consumer>{greeting => greeting}</Consumer>
</Provider>
);
ReactDOM.render(element, document.createElement('div')); // No warning, renders as expected
mount(element); // renders as expected, but yields the following warning:
/*
Warning: Failed prop type: Invalid prop `Component` supplied to `WrapperComponent`.
in WrapperComponent
*/
mount(<div>{element}</div>); // No warning, renders as expected
Expected behavior
I'd expect no warning to be emitted.
Desktop (please complete the following information):
I can't reproduce the issue anymore after updating enzyme to 3.5.0 and enzyme-adapter-react-16 1.3.0. I'm going to go ahead and close this since it appears to have been resolved 馃檪
Most helpful comment
I can't reproduce the issue anymore after updating enzyme to 3.5.0 and enzyme-adapter-react-16 1.3.0. I'm going to go ahead and close this since it appears to have been resolved 馃檪