Skip to content

Instantly share code, notes, and snippets.

@naishe
Last active December 6, 2020 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naishe/da4830b72eeb81f8a5e29b6e45692d86 to your computer and use it in GitHub Desktop.
Save naishe/da4830b72eeb81f8a5e29b6e45692d86 to your computer and use it in GitHub Desktop.
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