问题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 StartUp
.instantiateReactComponent
解决办法:
一定要使用<Navigator.Navigator />, 直接使用<Navigator></Navigator>,会报错
export default class Imooc_gp extends Component {
render() {
return (
<Navigator.Navigator
initialRoute={{component: Boy}}
renderScene={
(route, navigator) => {
let Component = route.component;
return <Component navigator={navigator} {...route.params}/>
}
}
/>
)
}
}
AppRegistry.registerComponent('imooc_gp', () => Imooc_gp);