Deep linking setup:
1import { NavigationContainer } from "@react-navigation/native";23const linking = {4 prefixes: ["myapp://", "https://myapp.com"],5 config: {6 screens: {7 Home: "",8 Profile: "profile/:id",9 Settings: "settings",10 },11 },12};1314function App() {15 return (16 <NavigationContainer linking={linking}>17 <Stack.Navigator>18 <Stack.Screen name="Home" component={HomeScreen} />19 <Stack.Screen name="Profile" component={ProfileScreen} />20 </Stack.Navigator>21 </NavigationContainer>22 );23}
Configuring URLs:
npx uri-scheme open myapp://profile/123