_react.default.createContext is not a function when using react-redux

Solution 1:

react-redux v6.0.0 uses the new context api provided by React and in order for it work, either you need to downgrade react-redux to v5.x.x or upgrade react and react-dom to v16.4 or above

If you are using yarn, you can run

yarn upgrade react react-dom

else with npm you can run

npm update react react-dom

You could also change the versions manually in package.json and run yarn install or npm install

Solution 2:

Got the issue fixed by updating the react and react-dom

npm update react react-dom

And ofcourse closing the server and restarting by npm start again.