Closed
Description
Currently, the Provider
component accepts only a single child:
render() {
return React.Children.only(this.props.children);
}
This somewhat messes with our implementation, and also seems to render the example in the readme invalid:
import Toolbar from './Toolbar';
import Feature from './Feature';
import { Provider } from 'react-slot-fill';
const App = () =>
<Provider>
<Toolbar />
<Feature />
</Provider>
ReactDOMFiber.render(
<App />,
document.getElementById('root')
);
Did I misunderstand any of this? Is there a reason why the library would not allow multiple children for Provider
?
Metadata
Assignees
Labels
No labels