mcpField
R
react-native-navigation

react-native-navigation

github.com/pluginagentmarketplaceDevelopment1064 installsUpdated 42w ago
Repository

About react-native-navigation

react-native-navigation is a learning skill for React Native developers using React Navigation v6+ and Expo Router. It covers typed navigation, common navigator patterns, deep links, and authentication flows.

Key features

  1. 01TypeScript setup for React Navigation
  2. 02Stack、Tab、Drawer ナビゲーター
  3. 03Deep links and universal links
  4. 04Typed screen parameters
  5. 05Authentication flow handling

Use cases

  1. 01Setting up navigation in a React Native app
  2. 02Passing screen parameters with type checks
  3. 03Configuring links to open specific screens
  4. 04Protecting routes in authentication flows

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pluginagentmarketplace/custom-plugin-react-native --skill react-native-navigation

After installing, type/react-native-navigationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/
config.yaml
schema.json
references/
GUIDE.md
PATTERNS.md
scripts/
validate.py

Details

From the project README

React Native Navigation Skill

Learn production-ready navigation patterns using React Navigation v6+ and Expo Router.

Prerequisites

  • React Native basics (components, styling)
  • TypeScript fundamentals
  • Understanding of React context

Learning Objectives

After completing this skill, you will be able to:

  • Set up React Navigation with TypeScript
  • Implement Stack, Tab, and Drawer navigators
  • Configure deep linking and universal links
  • Handle authentication flows
  • Pass params between screens type-safely

Topics Covered

1. Installation
npm install @react-navigation/native @react-navigation/native-stack
npm install react-native-screens react-native-safe-area-context

# For tabs
npm install @react-navigation/bottom-tabs

# For drawers
npm install @react-navigation/drawer react-native-gesture-handler react-native-reanimated
2. Stack Navigator
import { createNativeStackNavigator } from '@react-navigation/native-stack';

type RootStackParamList = {
  Home: undefined;
  Details: { id: string };
};

const Stack = createNativeStackNavigator<RootStackParamList>();

function RootNavigator() {
  return (
    <Stack.Navigator>
      <Stack.Screen name="Home" component={HomeScreen} />
      <Stack.Screen name="Details" component={DetailsScreen} />
    </Stack.Navigator>
  );
}
3. Tab Navigator
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';

const Tab = createBottomTabNavigator();

function MainTabs() {
  return (
    <Tab.Navigator>
      <Tab.Screen name="Home" component={HomeScreen} />
      <Tab.Screen name="Profile" component={ProfileScreen} />
    </Tab.Navigator>
  );
}
4. Deep Linking
const linking = {
  prefixes: ['myapp://', 'https://myapp.com'],
  config: {
    screens: {
      Home: 'home',
      Details: 'details/:id',
    },
  },
};

<NavigationContainer linking={linking}>
  {/* navigators */}
</NavigationContainer>
5. Type-Safe Navigation
import { useNavigation } from '@react-navigation/native';
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';

type NavigationProp = NativeStackNavigationProp<RootStackParamList>;

function HomeScreen() {
  const navigation = useNavigation<NavigationProp>();

  return (
    <Button
      title="Go to Details"
      onPress={() => navigation.navigate('Details', { id: '123' })}
    />
  );
}

Quick Start Example

import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

type RootStackParamList = {
  Home: undefined;
  Details: { id: string; title: string };
};

const Stack = createNativeStackNavigator<RootStackParamList>();

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen name="Home" component={HomeScreen} />
        <Stack.Screen name="Details" component={DetailsScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

Common Errors & Solutions

ErrorCauseSolution
"Navigator not found"Missing NavigationContainerWrap app in NavigationContainer
Params undefinedType mismatchCheck ParamList types
Deep link not workingConfig mismatchVerify linking paths

Validation Checklist

  • Navigation works on both platforms
  • Deep links open correct screens
  • TypeScript catches param errors
  • Auth flow protects routes

Usage

Skill("react-native-navigation")

Bonded Agent: 02-react-native-navigation

Comments

Markdown supported