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

后端 未结 9 559
谎友^
谎友^ 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:24

    It can also be caused from where the entry point is.

    In my case, the App.js was calling index.js (where the developer console was identifying the error, and where my RenderDom call was).

    However, App.js was referencing a component, and it was within that component that I had the error (a reference to yet another component that did not exist).

提交回复
热议问题