Last active
December 6, 2020 09:40
-
-
Save naishe/da4830b72eeb81f8a5e29b6e45692d86 to your computer and use it in GitHub Desktop.
Deep Linking Push Notifications with React Navigation #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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