From mind-react
React coding standards and best practices for any React web or React Native application — new or existing. Covers function components, hooks, Redux Toolkit state management, @emotion/@theme-ui styling, react-hook-form, React Router, custom REST client patterns, React Testing Library, naming conventions, and react-intl i18n. Use this skill whenever working on React JSX/JS files, whether creating a new app, adding features to an existing one, or reviewing React code. Also use when the user asks about React patterns, component design, state management, or testing strategies.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mind-react:reactThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Standards for React web and React Native applications. These conventions are grounded in
Standards for React web and React Native applications. These conventions are grounded in patterns from existing MindCTI projects (Authorization, Checkout, Selfcare, MobileSelfcare) and general React ecosystem best practices.
useState/useContext for component-scoped statesx prop and theme tokensRestClient with fetch for API calls — no axiosuseState for local UI state; Redux Toolkit for shared/server statecreateSlice + createAsyncThunk with builder.addCase() for Reduxsx prop — use theme tokens, never hardcode colors/spacingreact-hook-form with register() for simple inputs, Controller for complex onesRoutes, useNavigate) for new web appsRestClient class using fetch — never call fetch directly in componentsindex.js barrel exportsuseIntl() hook or <FormattedMessage> for all user-facing stringsuseReact.memo() only when profiling shows unnecessary re-renders__tests__/ directories next to the code they testredux-mock-store and @testing-library/react for component testsFor deeper guidance, read the relevant doc:
| Topic | Doc | When to read |
|---|---|---|
| Components & hooks | docs/component-architecture.md | Creating/reviewing components |
| State management | docs/state-management.md | Redux slices, Context, async logic |
| Styling | docs/styling.md | Theme-UI, emotion, responsive design |
| Forms | docs/forms.md | react-hook-form, validation |
| Routing | docs/routing.md | React Router v5/v6, protected routes |
| API patterns | docs/api-patterns.md | RestClient, fetch, error handling |
| Testing | docs/testing.md | RTL, Jest, snapshot vs interaction |
| Naming conventions | docs/naming-conventions.md | Files, components, Redux, hooks |
| i18n | docs/i18n.md | react-intl, translations |
These apply to any React app, not just MindCTI projects:
key when rendering lists — never use array index as key for dynamic listsuseEffect when adding listeners or timersuseEffect/useCallback/useMemo — the linter is rightFacadeAPI, AuthAPI) — not axiosProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub indra031/marketplace --plugin react