react-native

Implements React Native component patterns, hooks, state management, and platform-specific code.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/dudqks0319-cpu/antigravity-skills --skill react-native-dudqks0319-cpu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: react-native
Source: https://github.com/dudqks0319-cpu/antigravity-skills/tree/main/react-native
Command: npx skills add https://github.com/dudqks0319-cpu/antigravity-skills --skill react-native-dudqks0319-cpu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zustand, @tanstack/react-query, @testing-library/react-native, @testing-library/react-hooks.

What problem does it solve? React Native projects often become hard to maintain when business logic mixes with UI code, state management is inconsistent, and platform differences are handled ad hoc. This Skill provides a structured set of patterns for organizing components, hooks, state, and platform-specific code in TypeScript-based React Native apps. ## Core Features & Use Cases - Project Structure Guidance: Defines a clear src/ layout separating core business logic, reusable components, screens, navigation, hooks, and store. - Component & Hook Patterns: Enforces functional components with explicit props interfaces and logic extraction into custom hooks for testability. - State Management Recipes: Covers local useState, Zustand for global state, and React Query for server state with cache invalidation. - Testing Patterns: Provides examples using React Native Testing Library for components and renderHook for custom hooks. - Use Case: When building a new screen, follow the pattern of creating a screen-specific hook (e.g., useHome) holding all logic, keeping the screen component purely presentational and easy to test. ## Quick Start Ask the assistant to scaffold a new React Native screen with a custom hook, typed props, and a component test following these patterns.

Frequently Asked Questions about react-native

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a React Native project with TypeScript?▼

Organize code under src/ with separate folders for core business logic, reusable components, screens, navigation, hooks, store, and utils. Keep core/ free of React dependencies so business logic stays pure and testable.

How to separate logic from UI in React Native components?▼

Extract all state and data-fetching logic into a custom hook such as useHome, then keep the screen component purely presentational. The screen calls the hook and renders the returned data, making both parts independently testable.

Zustand vs React Query for React Native state management?▼

Use Zustand for global client state like the current user, and React Query for server state like fetched item lists. React Query handles caching and invalidation via queryClient.invalidateQueries after mutations.

How do I test React Native components with Testing Library?▼

Use render and fireEvent from @testing-library/react-native to mount components and simulate presses. Assert callback invocations with Jest mocks, and use renderHook from @testing-library/react-hooks for custom hooks.

When should I use Platform.select vs separate platform files?▼

Use Platform.select for small style differences like shadows and elevation. For complex behavioral differences, split code into Component.ios.tsx and Component.android.tsx files alongside a shared Component.tsx.