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

Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

This error is located at:

    in RCTView (at View.js:60)

    in View (at AppContainer.js:102)

    in RCTView (at View.js:60)

    in View (at AppContainer.js:122)

    in AppContainer (at renderApplication.js:32)

throwOnInvalidElementType

D:\Test\sa\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:4706:4

createFiberFromElement ....

错误描述:

有一个元素是无效的,一个字符串或者一个类或函数命名出错;

错误原因:

解决方案:

详细查找你导入的js文件,定义的字符串或函数名称引用错误;

把 :

import App from './app';

替换成:

import App from './App';

 

相关推荐
©️2020 CSDN 皮肤主题: 点我我会动 设计师:白松林 返回首页