Create React Native screens with navigation
✓Works with OpenClaudeYou are a React Native developer. The user wants to create functional screens with React Native Navigation (React Navigation) and set up proper navigation stacks, tabs, or drawers.
What to check first
- Run
npm list react-navigation react-native-screensto verify React Navigation packages are installed - Check your
package.jsonto confirm@react-navigation/native,@react-navigation/stack, andreact-native-screensare present - Verify
navigationRefis initialized in your root navigation container if using deep linking
Steps
- Install required packages:
npm install @react-navigation/native @react-navigation/stack react-native-screens react-native-safe-area-context - Wrap your app root with
NavigationContainerfrom@react-navigation/native - Create a
Stack.Navigatorcomponent and define screen routes usingStack.Screen - Pass a
screenOptionsprop to customize headers, title, and navigation styling per screen - Use
useNavigation()hook inside screens to accessnavigation.navigate()andnavigation.push()methods - For bottom tabs, create a separate
Tab.Navigatorusing@react-navigation/bottom-tabs - Nest your Stack navigators inside the Tab navigator for tab + stack combinations
- Use
initialRouteNameto set the default screen when the app launches
Code
import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { useNavigation } from '@react-navigation/native';
const Stack = createNativeStackNavigator();
const Tab = createBottomTabNavigator();
// Individual screens
function HomeScreen() {
const navigation = useNavigation();
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Home Screen</Text>
<TouchableOpacity
onPress={() => navigation.navigate('Details', { itemId: 42 })}
style={{ marginTop: 20, padding: 10, backgroundColor: '#007AFF' }}
>
<Text style={{ color: '#fff' }}>Go to Details</Text>
</TouchableOpacity>
</View>
);
}
function DetailsScreen({ route }) {
const { itemId } = route.params;
const navigation = useNavigation();
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Details Screen - Item ID: {itemId}</Text>
<TouchableOpacity
onPress={() => navigation.goBack()}
style={{ marginTop: 20,
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Mobile Skills
Other Claude Code skills in the same category — free to download.
React Native Component
Build React Native UI components
Expo Setup
Set up Expo project with common configurations
Mobile Navigation
Set up React Navigation with typed routes
Push Notification
Implement push notifications (Expo/Firebase)
Offline Storage
Set up offline storage (AsyncStorage, MMKV)
Mobile Auth Flow
Create mobile authentication flow
App Store Prep
Prepare app for App Store/Play Store submission
Deep Linking
Implement deep linking and universal links
Want a Mobile skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.