react-native Element type is invalid: expected a string (for built-in components) or a class/functio
2017-04-01 10:10
806 查看
1、报错提示:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `AppMain`.instantiateReactComponent D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\instantiateReactComponent.js:77:6performInitialMount
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactCompositeComponent.js:490:6mountComponent D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactCompositeComponent.js:346:40mountComponent
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactReconciler.js:62:6performInitialMount D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactCompositeComponent.js:496:6mountComponent
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactCompositeComponent.js:346:40mountComponent D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactReconciler.js:62:6mountChildren
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactMultiChild.js:264:10initializeChildren D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\native\ReactNativeBaseComponent.js:74:41mountComponent
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\native\ReactNativeBaseComponent.js:212:6mountComponent D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactReconciler.js:62:6performInitialMou
我遇到这个问题是因为没有跳转到页面没有指名是可以给其他类引用。也就是说没有写这个export default Me;Me是我第二个类的名字。写上这个问题就解决了。
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `AppMain`.instantiateReactComponent D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\instantiateReactComponent.js:77:6performInitialMount
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactCompositeComponent.js:490:6mountComponent D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactCompositeComponent.js:346:40mountComponent
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactReconciler.js:62:6performInitialMount D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactCompositeComponent.js:496:6mountComponent
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactCompositeComponent.js:346:40mountComponent D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactReconciler.js:62:6mountChildren
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactMultiChild.js:264:10initializeChildren D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\native\ReactNativeBaseComponent.js:74:41mountComponent
D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\native\ReactNativeBaseComponent.js:212:6mountComponent D:\software\react\app_projects\GankProject\node_modules\react-native\Libraries\Renderer\src\renderers\shared\stack\reconciler\ReactReconciler.js:62:6performInitialMou
我遇到这个问题是因为没有跳转到页面没有指名是可以给其他类引用。也就是说没有写这个export default Me;Me是我第二个类的名字。写上这个问题就解决了。
相关文章推荐
- ReactJs 报错 Element type is invalid: expected a string (from built-in components) or a class/function (for composite components) but got: undefined. Check the render method of `Me`.
- Element type is invalid: expected a string (for built-in components) or a class/function (for compos
- React.createElement: type is invalid -- expected a string (for built-in components) or a class/funct
- expected a string (for built-in components) or a class/function (for composite components) but got:
- The method sendKeys(CharSequence[]) in the type WebElement is not applicable for the arguments (String)
- mybatis There is no getter for property named 'xx' in 'class java.lang.String 没有写 xinwen.setsavetype
- 【Mybatis】There is no getter for property named 'type' in 'class java.lang.String'
- There is no getter for property named 'num' in 'class java.lang.String'。
- The method load(Class, Serializable) in the type Session is not applicable for the arguments (Class<
- The method setClass(Context, Class<?>) in the type Intent is not applicable for the arguments (GameV
- Message: u'The given selector btn dropdown-toggle btn-info is either invalid or does not result in a WebElement
- he method get(Class, Serializable) in the type HibernateTemplate is not applicable for the arguments
- Mybatis 对单独传入参数string进行判断时报There is no getter for property named '**' in 'class java.lang.String解决办法
- mybatis There is no getter for property named 'xx' in 'class java.lang.String
- The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the
- mybatis加Spring项目: 解决There is no getter for property named '***' in 'class java.lang.String'问题
- NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java class
- error: request for member '*' in '*', which is of non-class type '*'
- The method setClass(Context, Class<?>) in the type Intent is not applicable for the arguments (GameV
- Mybatis-There is no getter for property named 'id' in 'class java.lang.String'