> react-native-navigation-v6
React Navigation 6+ standards for stack, tab, and deep linking. Use when implementing React Navigation stacks, tabs, or deep linking in React Native. (triggers: **/*Navigation*.tsx, src/navigation/**, navigation, react-navigation, stack, tab, drawer, deep link)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/react-native-navigation-v6?format=md"React Native Navigation
Priority: P0 (CRITICAL)
Use React Navigation (official solution).
Implementation Guidelines
- Typed Navigation: Use TypeScript to define param lists.
- Centralized: Define all navigators in
src/navigation/. - Nesting: Nest navigators (e.g., Tab inside Stack).
- Options: Set
screenOptionsat navigator level, override per screen. - Header: Customize with
headerTitle,headerRight,headerLeft. - Deep Linking: Configure
linkingconfig for universal links.
Code
type RootStackParamList = {
Home: undefined;
Profile: { userId: string };
};
// Typed Navigation
const Stack = createNativeStackNavigator<RootStackParamList>();
function RootNavigator() {
return (
<Stack.Navigator>
<Stack.Screen name='Home' component={HomeScreen} />
<Stack.Screen name='Profile' component={ProfileScreen} />
</Stack.Navigator>
);
}
// Usage in Screen
function HomeScreen({
navigation,
}: NativeStackScreenProps<RootStackParamList, 'Home'>) {
navigation.navigate('Profile', { userId: '123' });
}
Anti-Patterns
- No String Literals: Use typed params.
- No Navigation in Business Logic: Pass callbacks from screens.
- No Deep Nesting: Max 2-3 levels of navigators.
Reference & Examples
See references/deep-linking.md for Universal Links, Nested Navigators, and State Persistence.
Related Topics
architecture | typescript/language
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)