throw error like below:
Unhandled JS Exception: Error: Route 'key0' should declare a screen. For example:
import MyScreen from './MyScreen';
...
key0: {
screen: MyScreen,
}
...
then I import all business components into the entry file, and combine them into
sorry i'm not good at English.
please give me a hand, I can't thank you any more
I export some Components from my business modules like below:
mm01.js
(...some imports gose here)
export default class MM01 extends Component{
render(){
return (
<Scene key="myModule01" initial tabs>
<Scene key="myModule010" initial component={MM010}>
<Scene key="myModule011" component={MM011}>
<Scene key="myModule012" component={MM012}>
<Scene key="myModule013" component={MM013}>
</Scene>
);
}
}
mm02.js
(...some imports gose here)
export default class MM02 extends Component{
render(){
return (
<Scene key="myModule02">
<Scene key="myModule020" initial component={MM020}>
<Scene key="myModule021" component={MM021}>
</Scene>
);
}
}
entry.js like below:
(...some imports gose here)
class App extends Component {
return (
<Router>
<Scene key="root">
<MM01 />
<MM02 />
</Scene>
</Router>
);
}
AppRegistry.registerComponent('rnMbox', () => App);
https://github.com/aksonov/react-native-router-flux/blob/v4/docs/OTHER_INFO.md#split-your-scenes-to-smaller-parts-if-needed
It works for me.
@wulala 璋㈣阿
@felixzxk Did you find a fix? Please help i'm having the same problem.
@isaackdamian
@wulala told the fix, Split your scenes to smaller parts if needed
https://github.com/aksonov/react-native-router-flux/blob/v4/docs/OTHER_INFO.md#split-your-scenes-to-smaller-parts-if-needed
How to use Component to divide routers?
Getting the same error as well with beta 31, the v3 method no longer works and the link above throws a 404 error
is this problem still going on ?
seriously ! please don't write packages if you can't maintain them, fix the issues
v3 and beta are not supported.
Most helpful comment
https://github.com/aksonov/react-native-router-flux/blob/v4/docs/OTHER_INFO.md#split-your-scenes-to-smaller-parts-if-needed
It works for me.