0
내가 오류가 예상 : 요소 유형이 잘못예외 : 반응 네이티브 탐색의 문자열 내가 탐색을 실행하려고하면
Exception: 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
Navigator
.
내 코드 :
import React, { Component } from 'react';
import {
AppRegistry,
Navigator
} from 'react-native';
import App from './app/App'
export default class MyApp extends Component {
renderScene (route, navigator) {
if (route.name === 'App') {
return <App navigator={navigator} {...route.passProps} />
}
}
configureScene (route) {
return Navigator.SceneConfigs.FloatFromBottom
}
render() {
return (
<Navigator
configureScene={ this.configureScene.bind(this) }
style={{ flex: 1, backgroundColor: 'white' }}
initialRoute={{ name: 'App' }}
renderScene={ this.renderScene.bind(this) }
/>
)
}
}
AppRegistry.registerComponent('MyApp',() => MyApp);
당신이 나를 도울 수 제발?
은'renderScene' 방법은 항상 유효보기를 반환해야합니다. 귀하의 경우에는 "App"경로에 대한보기 만 반환합니다. – jevakallio
죄송합니다 @jevakallio, 이해가 안됩니다. – mike90