Use when implementing navigation in React Native Web projects. Provides patterns for React Navigation, deep linking, and web-specific routing.
View on GitHubTheBushidoCollective/han
jutsu-react-native-web
jutsu/jutsu-react-native-web/skills/react-native-web-navigation/SKILL.md
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-react-native-web/skills/react-native-web-navigation/SKILL.md -a claude-code --skill react-native-web-navigationInstallation paths:
.claude/skills/react-native-web-navigation/# React Native Web - Navigation
Navigation patterns for React Native Web using React Navigation, supporting both native and web platforms with a unified API.
## Key Concepts
### React Navigation
React Navigation is the standard navigation library for React Native and React Native Web:
```typescript
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
const Stack = createNativeStackNavigator();
export function App() {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Details" component={DetailsScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
```
### Type-Safe Navigation
Define navigation types for type safety:
```typescript
import type { NativeStackScreenProps } from '@react-navigation/native-stack';
type RootStackParamList = {
Home: undefined;
Details: { id: string; title: string };
Profile: { userId: string };
};
type HomeProps = NativeStackScreenProps<RootStackParamList, 'Home'>;
type DetailsProps = NativeStackScreenProps<RootStackParamList, 'Details'>;
function HomeScreen({ navigation }: HomeProps) {
return (
<Button
title="Go to Details"
onPress={() => navigation.navigate('Details', { id: '123', title: 'Item' })}
/>
);
}
```
### Web URLs
React Navigation automatically handles URLs on web:
```typescript
import { LinkingOptions } from '@react-navigation/native';
const linking: LinkingOptions<RootStackParamList> = {
prefixes: ['https://myapp.com', 'myapp://'],
config: {
screens: {
Home: '',
Details: 'details/:id',
Profile: 'profile/:userId',
},
},
};
<NavigationContainer linking={linking}>
{/* Navigator */}
</NavigationContainer>
```
## Best Practices
### Stack Navigator
✅ Use for screen-to-screen navigation:
```typescript
import { createNativeStackNavigator } from '@react-nav