1
votes

I'm new in the React world. I got a course to training React and Redux.

Even though, I walk through the author course and copy the code from the screen I get an error:

Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).

The error happens as soon as I run a npm start, open the browser and got this error.

I have uploaded my code to github: https://github.com/tarcisiocorte/reactredux.git

I will appreciate some help.

1
Seems like a component is returning null from render, can you post a full log of the error? - Giovanni Klein Campigoto

1 Answers

2
votes

The problem is with this line. Provider is not a default export of react-redux, so you should be importing it as import { Provider } from 'react-redux';.

Good luck with your React Redux journey :-)