幕布斯1241391
2020-08-07 11:51
ThemeContext.Provider一加,就报错
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `App`.
Module../src/index.js
C:/Learning/react1010806/src/index.js:8
5 | import * as serviceWorker from './serviceWorker';
6 | import 'bootstrap/dist/css/bootstrap.min.css';
7 |
> 8 | ReactDOM.render(
9 | <React.StrictMode>
10 | <App />
11 | </React.StrictMode>,
该怎么解决呢???
确认是否导入:import ThemeContext from './theme-context'
基于实例的 React16 傻瓜课程
22387 学习 · 106 问题
相似问题