Skip to content

Instantly share code, notes, and snippets.

@emeraldsanto
Last active September 4, 2021 03:39
Show Gist options
  • Select an option

  • Save emeraldsanto/50c4e6058714d570f4d00b101cbe621e to your computer and use it in GitHub Desktop.

Select an option

Save emeraldsanto/50c4e6058714d570f4d00b101cbe621e to your computer and use it in GitHub Desktop.
Achieving type safe deep linking in React Native with react-navigation #1
import { NavigationContainer } from '@react-navigation/native';
const linking = {
prefixes: ['https://mychat.com', 'mychat://'],
config: {
screens: {
Chat: 'feed/:sort',
Profile: 'user',
}
},
};
function App() {
return (
<NavigationContainer linking={linking} fallback={<Text>Loading...</Text>}>
{/* content */}
</NavigationContainer>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment