I might have missed something in the docs here.
Does react-native-router-flux
allow for a parent scene with a component, which would render the child scenes through it?
In code speak, for this routing:
<Scene key="home" component={ApplicationRoot}>
<Scene key="settings" component={Settings} />
</Scene>
the ApplicationRoot
component would
class ApplicationRoot extends React.Component {
constructor() { .. }
render() {
return(
<View>{this.props.children}</View>
);
}
}
passing Settings
through here.
The idea being I can have lifecycle functions within ApplicationRoot
to handle app-level functionality (like checking if logged in, listening for log outs etc), that would apply to all nested routes.
If this isn't possible via a wrapping parent component, does anyone know of a way to achieve this?