Skip to the page

RN navigation & linking · Build it

Deep linking: cold vs warm start

The 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

  1. "How does it behave if the user isn't logged in?"
  2. "What native setup is needed on iOS and Android?"
  3. "Custom scheme vs universal link: which is secure?"
  4. "How do you test it?"

The answer

What a strong answer covers

  • Cold start uses Linking.getInitialURL(); warm start uses the url event. React Navigation's linking prop handles both, including nested screens.
  • Auth gate: stash the pending URL, then replay it after login (or use getStateFromPath).
  • Native: Android intent filters; iOS RCTLinkingManager in AppDelegate. On RN 0.88 with SceneDelegate, forward URL and user-activity callbacks to RCTLinkingManager.
  • Test with npx uri-scheme or adb 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 voice

Practise 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.

Start your free interview