【发布时间】:2016-07-20 09:10:42
【问题描述】:
所以我正在尝试使用这个示例应用程序:
https://github.com/aksonov/react-native-router-flux/tree/master/Example
但是当我重命名以下行时:
index.ios.js
import App from './App';
AppRegistry.registerComponent('App', () => App);
index.android.js
import App from './App';
AppRegistry.registerComponent('App', () => App);
我已将Example.js 重命名为App.js 并更新了内容:
class App extends Component {
render() {
return (
<Router createReducer={reducerCreate} getSceneStyle={getSceneStyle}>
//...
</Router>
);
}
}
export default App;
但是当我尝试编译应用程序时,我收到以下错误。
Application Example has not been registered.
This is either due to a require() error during initialisation or failure to call AppRegistery.registerComponent.
【问题讨论】:
标签: javascript android ios reactjs react-native