As I understand it the Provider requires a single ReactElement as stated here https://github.com/reactjs/react-redux/issues/561
But with the release of React 16 React now supports returning arrays from render.
Are there any plans to update the Provider to support this feature? If not, why, is there some other reasoning behind this requirement?
As long as we continue to support older versions of React, we will need to have this restriction in place.
This generally isn't an issue because <Provider> is normally placed at the top of the tree and there is usually a single child under it, either another wrapper component (such as a router) or the base "App" or "Root" component for your application.
OK, thanks for the explanation. I understand, and agree that it's not the normal case to have something that returns an array directly within the Provider. And it's usually easy enough to work around it (just wrapping your array of React elements in an extra <div>...</div> for instance.
Most helpful comment
As long as we continue to support older versions of React, we will need to have this restriction in place.
This generally isn't an issue because
<Provider>is normally placed at the top of the tree and there is usually a single child under it, either another wrapper component (such as a router) or the base "App" or "Root" component for your application.