Skip to content
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

Provider children error after updating #561

Closed
zabojad opened this issue Dec 6, 2016 · 1 comment
Closed

Provider children error after updating #561

zabojad opened this issue Dec 6, 2016 · 1 comment

Comments

@zabojad
Copy link

zabojad commented Dec 6, 2016

I've updating redux, reat-redux and react on my project and now, this:

var tmp = React.createElement(myproject_view_Application.Reduxed,{ });
ReactDOM.render(React.createElement(Provider,{ store : store},tmp,"\t"),win.document.querySelector("#app"));

throws:

Warning: Failed prop type: Invalid prop `children` of type `array` supplied to `Provider`, expected a single ReactElement.
Uncaught Error: React.Children.only expected to receive a single React element child.(…)

I do not understand as I correctly give a sigle child to my Provider component... This was working with react 15.1.0 and react-redux 4.4.5.

I'm having this issue with react 15.4.1 and react-redux 4.4.6.

@jimbolla
Copy link
Contributor

jimbolla commented Dec 6, 2016

You're passing tmp and "\t" as children to Provider. Provider expects a single child. Get rid of the second one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants