React Native Router Flux - CyprusInternationalUniversity/LoginSystemCrossApp GitHub Wiki
For Routing purpose, we are using react-native-router-flux
which is a different API over react-navigation
. It helps users to define all the routes in one central place and navigate and communicate between different screens in an easy way. But it also means that react-native-router-flux
inherits all limitations and changes from updated versions.
Define all your routes in one React component...
const App = () => (
<Router>
<Stack key="root">
<Scene key="login" component={Login} title="Login"/>
<Scene key="register" component={Register} title="Register"/>
<Scene key="home" component={Home}/>
</Stack>
</Router>
);
...and navigate from one scene to another scene with a simple and powerful API.
// Login.js
// navigate to 'home' as defined in your top-level router
Actions.home(PARAMS)
// go back (i.e. pop the current screen off the nav stack)
Actions.pop()
// refresh the current Scene with the specified props
Actions.refresh({param1: 'hello', param2: 'world'})
Available imports
- Router
- Scene
- Tabs
- Stack
- Tabbed Scene
- Drawer
- Modal
- Lightbox
- Actions
- ActionConst
For more information on API, Access link https://github.com/aksonov/react-native-router-flux/blob/master/docs/API.md