Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
alinaqi avatar

React Native

  • 533 installs
  • 706 repo stars
  • Updated July 14, 2026
  • alinaqi/claude-bootstrap

react-native is a Claude Code skill that enforces React Native project structure, typed functional components, screen-hook patterns, and platform-specific code conventions for developers who maintain cross-platform mobil

About

react-native is a mobile development skill from alinaqi/claude-bootstrap that steers agents toward a `src/core`, `src/components`, and `src/screens` layout with barrel exports, co-located `Button.test.tsx` files, and separation of pure business logic from React UI. It activates on edits to `.tsx`, `.jsx`, `ios/**`, `android/**`, and `app.json` paths with medium effort. Developers reach for react-native when scaffolding or refactoring React Native apps and need consistent screen components, reusable UI modules, and typed functional patterns instead of ad-hoc folder sprawl. The skill is user-invocable false, so agents load it automatically during mobile file edits.

  • Opinionated src layout: core business logic, components, screens, navigation, hooks, and store
  • Barrel exports and per-screen folders with dedicated hooks (e.g. useHome.ts)
  • Functional components only with explicit TypeScript props interfaces
  • Path triggers for **/*.tsx, **/*.jsx, ios/**, android/**, and app.json
  • Separates pure core/services from React UI layers for testability

React Native by the numbers

  • 533 all-time installs (skills.sh)
  • Ranked #297 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/alinaqi/claude-bootstrap --skill react-native

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs533
repo stars706
Security audit3 / 3 scanners passed
Last updatedJuly 14, 2026
Repositoryalinaqi/claude-bootstrap

How do you structure React Native TypeScript app folders?

Apply React Native folder layout, typed functional components, and screen-hook patterns while editing mobile app code.

Who is it for?

Developers building or refactoring React Native apps in TypeScript who want enforced folder conventions and screen-hook patterns across ios and android targets.

Skip if: Developers working on Flutter, native Swift/Kotlin-only apps, or backend API services should skip react-native.

When should I use this skill?

Agent edits React Native `.tsx`, `.jsx`, `ios/**`, `android/**`, or `app.json` files during mobile feature work.

What you get

React Native codebase with `src/core`, `src/components`, `src/screens` layout, barrel exports, and co-located component tests.

  • Structured mobile source tree
  • Typed functional screen and component files

By the numbers

  • Scopes to 5 path globs including `**/*.tsx`, `ios/**`, `android/**`, and `app.json`

Files

SKILL.mdMarkdownGitHub ↗

React Native Skill

---

Project Structure

project/
├── src/
│   ├── core/                   # Pure business logic (no React)
│   │   ├── types.ts
│   │   └── services/
│   ├── components/             # Reusable UI components
│   │   ├── Button/
│   │   │   ├── Button.tsx
│   │   │   ├── Button.test.tsx
│   │   │   └── index.ts
│   │   └── index.ts            # Barrel export
│   ├── screens/                # Screen components
│   │   ├── Home/
│   │   │   ├── HomeScreen.tsx
│   │   │   ├── useHome.ts      # Screen-specific hook
│   │   │   └── index.ts
│   │   └── index.ts
│   ├── navigation/             # Navigation configuration
│   ├── hooks/                  # Shared custom hooks
│   ├── store/                  # State management
│   └── utils/                  # Utilities
├── __tests__/
├── android/
├── ios/
└── CLAUDE.md

---

Component Patterns

Functional Components Only

// Good - simple, testable
interface ButtonProps {
  label: string;
  onPress: () => void;
  disabled?: boolean;
}

export function Button({ label, onPress, disabled = false }: ButtonProps): JSX.Element {
  return (
    <Pressable onPress={onPress} disabled={disabled}>
      <Text>{label}</Text>
    </Pressable>
  );
}

Extract Logic to Hooks

// useHome.ts - all logic here
export function useHome() {
  const [items, setItems] = useState<Item[]>([]);
  const [loading, setLoading] = useState(false);

  const refresh = useCallback(async () => {
    setLoading(true);
    const data = await fetchItems();
    setItems(data);
    setLoading(false);
  }, []);

  return { items, loading, refresh };
}

// HomeScreen.tsx - pure presentation
export function HomeScreen(): JSX.Element {
  const { items, loading, refresh } = useHome();
  
  return (
    <ItemList items={items} loading={loading} onRefresh={refresh} />
  );
}

Props Interface Always Explicit

// Always define props interface, even if simple
interface ItemCardProps {
  item: Item;
  onPress: (id: string) => void;
}

export function ItemCard({ item, onPress }: ItemCardProps): JSX.Element {
  ...
}

---

State Management

Local State First

// Start with useState, escalate only when needed
const [value, setValue] = useState('');

Zustand for Global State (if needed)

// store/useAppStore.ts
import { create } from 'zustand';

interface AppState {
  user: User | null;
  setUser: (user: User | null) => void;
}

export const useAppStore = create<AppState>((set) => ({
  user: null,
  setUser: (user) => set({ user }),
}));

React Query for Server State

// hooks/useItems.ts
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';

export function useItems() {
  return useQuery({
    queryKey: ['items'],
    queryFn: fetchItems,
  });
}

export function useCreateItem() {
  const queryClient = useQueryClient();
  
  return useMutation({
    mutationFn: createItem,
    onSuccess: () => {
      queryClient.invalidateQueries({ queryKey: ['items'] });
    },
  });
}

---

Testing

Component Testing with React Native Testing Library

import { render, fireEvent } from '@testing-library/react-native';
import { Button } from './Button';

describe('Button', () => {
  it('calls onPress when pressed', () => {
    const onPress = jest.fn();
    const { getByText } = render(<Button label="Click me" onPress={onPress} />);
    
    fireEvent.press(getByText('Click me'));
    
    expect(onPress).toHaveBeenCalledTimes(1);
  });

  it('does not call onPress when disabled', () => {
    const onPress = jest.fn();
    const { getByText } = render(<Button label="Click me" onPress={onPress} disabled />);
    
    fireEvent.press(getByText('Click me'));
    
    expect(onPress).not.toHaveBeenCalled();
  });
});

Hook Testing

import { renderHook, act } from '@testing-library/react-hooks';
import { useCounter } from './useCounter';

describe('useCounter', () => {
  it('increments counter', () => {
    const { result } = renderHook(() => useCounter());
    
    act(() => {
      result.current.increment();
    });
    
    expect(result.current.count).toBe(1);
  });
});

---

Platform-Specific Code

Use Platform.select Sparingly

import { Platform } from 'react-native';

const styles = StyleSheet.create({
  shadow: Platform.select({
    ios: {
      shadowColor: '#000',
      shadowOffset: { width: 0, height: 2 },
      shadowOpacity: 0.1,
    },
    android: {
      elevation: 2,
    },
  }),
});

Separate Files for Complex Differences

Component/
├── Component.tsx          # Shared logic
├── Component.ios.tsx      # iOS-specific
├── Component.android.tsx  # Android-specific
└── index.ts

---

React Native Anti-Patterns

  • ❌ Inline styles - use StyleSheet.create
  • ❌ Logic in render - extract to hooks
  • ❌ Deep component nesting - flatten hierarchy
  • ❌ Anonymous functions in props - use useCallback
  • ❌ Index as key in lists - use stable IDs
  • ❌ Direct state mutation - always use setter
  • ❌ Mixing business logic with UI - keep core/ pure
  • ❌ Ignoring TypeScript errors - fix them
  • ❌ Large components - split into smaller pieces

Related skills

Forks & variants (1)

React Native has 1 known copy in the catalog totaling 3 installs. They canonicalize to this original listing.

How it compares

Pick react-native over generic React skills when the codebase includes `ios/` and `android/` native directories and mobile screen-hook conventions matter.

FAQ

What folder structure does react-native enforce?

react-native prescribes `src/core` for pure business logic, `src/components` for reusable UI with barrel exports, and `src/screens` for route-level screen components with co-located tests.

Which file paths trigger the react-native skill?

react-native activates on `**/*.tsx`, `**/*.jsx`, `ios/**`, `android/**`, and `app.json` edits, matching typical React Native mobile app source and native project files.

Is React Native safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.