Skip to content

Instantly share code, notes, and snippets.

@naishe
Last active Dec 6, 2020
Embed
What would you like to do?
Deep Linking Push Notifications with React Navigation #3
// App.tsx
// Deep links
const deepLinksConf = {
screens: {
HomeRoutes: {
initialRouteName: 'Home',
screens: {
Settings: 'settings',
Comics: 'comics/:comicsId',
Quiz: 'quiz/:quizGroupId/:title',
PersonalityTest: 'personality/:testId',
Home: 'home',
},
},
},
};
const linking: LinkingOptions = {
prefixes: ['myapp://', 'https://app.myapp.com'],
config: deepLinksConf,
}
const App = () => {
return (
<NavigationContainer linking={linking} >
{/** Your routes here */}
<LoginSignupRoutes />
<HomeRoutes />
</NavigationContainer>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment