You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
As I understand it the
Provider
requires a single ReactElement as stated here #561But 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?The text was updated successfully, but these errors were encountered: