Element type is invalid: expected a string (for built-in components) or a class/function

后端 未结 9 563
谎友^
谎友^ 2020-12-03 21:11
import React from \'react\';
import ReactDOM from \'react-dom\';
import Map from \'./components/map/container/map\';
import App from \'./App\';
import \'./index.css\         


        
9条回答
  •  既然无缘
    2020-12-03 21:36

    I ran into the same problem in my react application. It's definitely your import statements as stated above. I changed:

    import {x} from '/x.js' to import x from '/x.js'

    and that got the job done

提交回复
热议问题