RN navigation & linking · Build it
Deep linking: cold vs warm start
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe interviewer asks
"Give me a question on deep linking in React Native." In practice: "A marketing link myapp://order/123 should open the order screen whether the app is killed, backgrounded or open. Implement it."
const linking = {
prefixes: ['myapp://', 'https://shop.example.com'],
config: { screens: { Home: { screens: { Order: 'order/:id' } } } },
};
<NavigationContainer linking={linking}>...</NavigationContainer>
Then
Follow-ups the interviewer asks next
- "How does it behave if the user isn't logged in?"
- "What native setup is needed on iOS and Android?"
- "Custom scheme vs universal link: which is secure?"
- "How do you test it?"
The answer
What a strong answer covers
- Cold start uses
Linking.getInitialURL(); warm start uses theurlevent. React Navigation'slinkingprop handles both, including nested screens. - Auth gate: stash the pending URL, then replay it after login (or use
getStateFromPath). - Native: Android intent filters; iOS
RCTLinkingManagerin AppDelegate. On RN 0.88 with SceneDelegate, forward URL and user-activity callbacks toRCTLinkingManager. - Test with
npx uri-schemeoradb shell am start -d. - Never put tokens in deep links: any app can claim a custom scheme.
The red pen
Common traps
Avoid:handling only the warm case. Navigating before the container is ready.
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voicePractise questions like this out loud
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.