September 2018
Beginner
156 pages
3h 28m
English
The <DeepLinking> component in the react-router-native package uses React Native's Linking interface to listen to the changes in the URL. Whenever a change is detected, the user is navigated to the requested path by adding an entry in the history stack.
The <DeepLinking> component can be included anywhere in the application:
export class RootComponent extends Component { render() { return ( <View style={styles.container}> <DeepLinking /> <View style={styles.nav}> <Link to="/app.chapter7.com"> <Text>Home</Text> </Link> <Link to="/app.chapter7.com/dashboard"> <Text>Dashboard</Text> </Link> </View> <View style={styles.routeContainer}> <Route path="/app.chapter7.com" exact component={HomeComponent} />
Read now
Unlock full access