Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

react-native-state-management

FreeNo executable scriptsNot checked

Implement local and global state with Context, Zustand, and Redux Toolkit in React Native. Use when choosing or implementing state management in React Native…

HoangNguyen0403by HoangNguyen0403★ 598 GitHub stars

About this skill

React Native State Management

Priority: P1 (HIGH)

State Strategy

  • Local State: Use useState for component-scoped state (forms, UI toggles).
  • Lifted State: Share between siblings via parent component.
  • Context: Share across components without prop drilling (theme, auth).
  • Zustand: Lightweight global state for small-medium apps.
  • Redux Toolkit: Complex apps with time-travel debugging needs.
  • Server State: Use @tanstack/react-query for API data (caching, refetching).
const ThemeContext = createContext<ThemeContextType | undefined>(undefined);

export function useTheme() {
  const ctx = useContext(ThemeContext);
  if (!ctx) throw new Error('useTheme must be inside ThemeProvider');
  return ctx;
}

Zustand (Recommended for Most Apps)

import { create } from 'zustand';

const useStore = create((set) => ({
  count: 0,
  increment: () => set((state) => ({ count: state.count + 1 })),
}));

// Usage
const count = useStore((state) => state.count);

Anti-Patterns

  • No Redux for Everything: Start with Context/Zustand.
  • No Prop Drilling: Use Context for global state.
  • No Derived State in State: Compute in render.

References

See references/REFERENCE.md for Context patterns, Zustand store setup, Redux Toolkit, and React Query.

Install react-native-state-management in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

evals/evals.jsonreferences/REFERENCE.md

FAQ

What does the react-native-state-management skill do?

Implement local and global state with Context, Zustand, and Redux Toolkit in React Native. Use when choosing or implementing state management in React Native with Context, Zustand, or Redux.

How do I install the react-native-state-management skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the react-native-state-management skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare react-native-state-management with