question is caused by react version, update your react version, it will be ok.
use "npm update react" and ""npm update react-dom""
//before:
"react": "^16.2.0",
"react-dom": "^16.2.0",
//after update:
"react": "^16.6.3",
"react-dom": "^16.6.3",
Uncaught TypeError: _react2.default.createContext is not a function
原文:https://www.cnblogs.com/begin256/p/11386315.html