conventions-react
/conventions-react
React and Next.js default conventions — server vs client components, state placement, effects, memoization, forms, styling and UI kits. Use when writing or changing React/Next.js components, hooks or TSX files.
- Author
- bitIO ↗
- Repository
- wheelhouse ↗
- Licence
- MIT
- Last repository change
- 12.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 12.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
React and Next.js default conventions — server vs client components, state placement, effects, memoization, forms, styling and UI kits. Use when writing or changing React/Next.js components, hooks or TSX files.
Original author description
React and Next.js default conventions — server vs client components, state placement, effects, memoization, forms, styling and UI kits. Use when writing or changing React/Next.js components, hooks or TSX files.
How it works
- Components and data
- Effects
- Memoization
- Forms
- Styling and UI kits
SKILL.md preview
--- name: conventions-react description: React and Next.js default conventions — server vs client components, state placement, effects, memoization, forms, styling and UI kits. Use when writing or changing React/Next.js components, hooks or TSX files. --- The repo's own conventions (`AGENTS.md`, lint rules, existing components) win over these. Accessibility review: `check-a11y`. Tests: `conventions-testing`. ## Components and data - **Server first** where the framework supports it (Next.js App Router): fetch on the server, and mark `"use client"` only on the leaves that need interactivity. - **Server state is not app state.** Use RSC or a query cache (TanStack Query, SWR) for server data. Use `useState`/`useReducer` for local UI state, context for cross-cutting values (theme, session), and a store (Zustand, Jotai, Redux Toolkit) only for real client-side app state. - **Compose before you lift.** Pass `children` or slots first. Reach for context or a store only when drilling goes past 2–3 levels. - **One non-trivial component per file**, with its styles and tests next to it. - **Stable keys**: never the array index for lists that can reorder, insert or delete. - **Suspense and error boundaries** at least at route level. ## Effects - **Effects are for syncing with external systems**, not for deriving data. Compute derived values during render, and handle user actions in event handlers. - **Always clean up**: timers, subscriptions, and `AbortController` for fetches. No floating promises. - Correct dependency arrays. No disabling `react-hooks/exhaustive-deps` without a comment explaining why. - **Custom hooks (`use*`)** extract state and effects together, not render logic. ## Memoization - **With React Compiler enabled**: don't add `useMemo`, `useCallback` or `memo` by hand. - **Without it**: only when profiling shows a cost, or to keep a prop stable for an already memoized child. ## Forms - Prefer the UI kit's form API, or `react-hook-form`, with schema validation (zod). The same schema validates on the server. - With server actions, use `useActionState` for pending and error state instead of hand-rolled flags. ## Styling and UI kits - **The project's UI kit first**: buttons, modals, tables, inputs, notifications and forms come from the kit, not hand-rolled primitives. - **Check the kit's current docs or MCP server for props and APIs**: they change between majors. For example, Mantine 7+ has no `createStyles`; use CSS modules plus the `classNames`/`styles` props. - **Theme tokens** (colors, spacing, radius) instead of hard-coded hex values and magic numbers. Respect the user's color scheme; never force dark mode off. - **CSS modules, Tailwind or the kit's style API** over global CSS. Inline `style` only for truly dynamic values. No `!important` except to override third-party styles. - Mobile first unless the project says otherwise. - Don't disable the kit's built-in accessibility (focus rings, labels, keyboard handling).
Versions
The database has no other skills named conventions-react.
Database snapshot: 13.11.2026 · package version cf5824a6e19a (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90react
Use when writing or reviewing React components — hooks, effects, component boundaries, state placement, or re-render problems in React 18 or 19. - 100react-conventions
Standards for writing React code — props, JSX, component structure, effects. Use when writing or reviewing any component or hook, even if conventions aren't mentioned. Targets React 19. - 90react-best-practices
React component conventions for explicit state ownership and data flow. Use when creating or reviewing React components, hooks, effects, or forms. - 90react-best-practices
React component conventions for explicit state ownership and data flow. Use when creating or reviewing React components, hooks, effects, or forms. - 90react-nextjs
Build and review React and Next.js (App Router) apps: components, server vs client, data fetching, state, forms, performance, testing. Use when the chosen frontend stack is React or Next.js. - 100react-best-practices
React component work, covering boundaries between components, where state lives, Hooks, Effects, data fetching, rendering and interaction performance. Use when writing, changing or reviewing React components. For SSR or RSC, consult the guidance for the project's version. Does…