Challenge - 5 Problems
Deep Linking Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ ui_behavior
intermediate2:00remaining
What happens when a deep link is opened?
In a React Native app configured for deep linking, what is the expected behavior when a user opens a deep link URL that matches a registered route?
Attempts:
2 left
💡 Hint
Think about what deep linking is designed to do in navigation.
✗ Incorrect
Deep linking allows the app to open directly to a specific screen based on the URL, improving user experience by skipping intermediate screens.
🧠 Conceptual
intermediate2:00remaining
Purpose of URL schemes in deep linking
Why do React Native apps use custom URL schemes or universal links for deep linking?
Attempts:
2 left
💡 Hint
Consider how apps can be launched from outside themselves.
✗ Incorrect
Custom URL schemes and universal links let other apps or browsers open your app directly to a specific screen using a URL.
📝 Syntax
advanced2:00remaining
Correct deep linking config in React Navigation
Which option shows the correct way to configure deep linking in React Navigation for a screen named 'Profile' with path 'user/:id'?
Attempts:
2 left
💡 Hint
Look for the correct nested object structure for screen paths.
✗ Incorrect
React Navigation expects the config to have a screens object where each screen can have a path property as a string.
❓ lifecycle
advanced2:00remaining
Handling deep link when app is already open
What is the recommended way to handle a deep link URL when the React Native app is already running in the background?
Attempts:
2 left
💡 Hint
Think about how apps listen for new data while running.
✗ Incorrect
React Native apps can listen for URL events to handle deep links dynamically without restarting.
🔧 Debug
expert2:00remaining
Why does this deep link not open the correct screen?
Given this linking config snippet, why does opening 'myapp://profile/123' not navigate to the Profile screen?
const linking = {
prefixes: ['myapp://'],
config: {
screens: {
Profile: 'user/:id'
}
}
};
Attempts:
2 left
💡 Hint
Check if the URL path matches the configured path exactly.
✗ Incorrect
The URL uses 'profile/123' but the config expects 'user/:id', so the route does not match and navigation fails.