计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
react-native-state-management【效率与协作】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.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
useState for component-scoped state (forms, UI toggles).@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;
}
import { create } from 'zustand';
const useStore = create((set) => ({
count: 0,
increment: () => set((state) => ({ count: state.count + 1 })),
}));
// Usage
const count = useStore((state) => state.count);
See references/REFERENCE.md for Context patterns, Zustand store setup, Redux Toolkit, and React Query.
When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant: