react-best-practices
Apply version-aware React practices when implementing, reviewing, or refactoring components, hooks, and application UI while preserving the project's…
Skill by Jack-WebDev
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jack-webdev-react-best-practices
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, frontend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/react-best-practices
What's inside
- Skill name
react-best-practices- Description
- Apply version-aware React practices when implementing, reviewing, or refactoring components, hooks, and application UI while preserving the project's established architecture.
- License
- MIT
- Instructions
- 75 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# React Best Practices Build predictable, accessible React interfaces with clear state ownership, focused components, and minimal synchronization logic. ## Treat the installed version as authoritative Before changing React code, inspect the installed `react`, `react-dom`, framework, type definitions, build tooling, and relevant surrounding code. Follow the APIs and conventions supported by those versions. A React 18 codebase must not be rewritten with React 19-only APIs, syntax, or recommendations merely because they are newer. Use React 19 features only when the installed stack supports them and they suit the task. Do not turn unrelated work into a React, framework, compiler, rendering, or hydration migration. Preserve the existing rendering and application architecture unless the requested work requires changing it. When an upgrade would be valuable but is out of scope, describe it separately rather than implementing it silently. ## Respect the existing ecosystem Understand how the project currently handles routing, server rendering, data fetching, forms, state, styling, errors, and testing. Follow sound established conventions and the installed framework's architecture. Do not introduce or replace a router, global store, form library, data-fetching library, component system, or framework merely because another option is newer or fashionable. Do not introduce framework-specific patterns into an application that does not use that framework. ## Keep components focused Give each component a clear UI or behavioral responsibility. Prefer understandable JSX and composition over giant configurable components, render machinery, inheritance, or unnecessary wrapper components. Extract a component or custom hook when it creates a meaningful boundary, clarifies state ownership, isolates cohesive behavior, or enables real reuse. Do not split code based only on line count or create abstractions for hypothetical reuse. Keep component APIs small and meaningful. Passing props through a few levels is normal; introduce context only when data is genuinely shared across a meaningful subtree. Do not use context as an automatic global-state solution. ## Model state deliberately Keep state as local as practical and lift it only to the nearest owner that must coordinate it. Do not introduce global state when component, URL, server, or existing library state is sufficient. Store the minimum source of truth: - derive values during render instead of synchronizing duplicate state - avoid contradictory state combinations - preserve rather than accidentally reset state when component identity should remain stable - treat state and props as immutable - use functional state updates when the next value depends on the previous value Preserve controlled and uncontrolled component semantics. Do not switch between them accidentally or maintain competing sources of truth. ## Use effects for external synchronization Use effects to synchronize with systems outside React, such as subscriptions, browser APIs, timers, or imperative libraries. Do not use effects as the default mechanism for deriving render values, handling user events, or chaining application control flow. Keep effect dependencies accurate. Do not suppress dependency warnings to force desired timing. Make setup and cleanup symmetrical, prevent stale asynchronous work from updating state, and ensure behavior remains correct when development tooling runs effects more than once. ## Use hooks and optimization correctly Follow the Rules of Hooks: call hooks unconditionally at the top level of React components or custom hooks. Custom hooks should represent cohesive reusable behavior, not hide arbitrary code. Do not add `useMemo`, `useCallback`, or `memo` by default. Use them when profiling, referential stability requirements, or a demonstrated expensive calculation provides a concrete reason. Confirm that their dependencies and maintenance cost do not outweigh the benefit. Use refs for values that do not participate in rendering or for supported imperative integration. Do not use refs to bypass React's state model. ## Preserve interaction and accessibility Keep event handling explicit and close to the behavior it triggers. Use semantic HTML first, preserve keyboard access and focus behavior, label controls, and expose meaningful accessible names and states. Use stable list keys derived from item identity. Avoid array indexes when items can be inserted, removed, filtered, or reordered. Handle loading, empty, error, and success states where relevant. Preserve the project's existing error-boundary, Suspense, and server/client conventions, and verify their support before introducing new ones. ## Verify the result Test observable user behavior rather than component internals. Confirm that: 1. Every API and pattern is supported by the installed React and framework versions. 2. Rendering stays pure and state has one clear owner. 3. Derived values are not duplicated in state and effects are truly necessary. 4. Hooks, dependencies, cleanup, and asynchronous behavior are correct. 5. Memoization and abstractions have a concrete benefit. 6. Accessibility and controlled or uncontrolled semantics are preserved. 7. Existing libraries and architecture were respected.
From Jack-WebDev/skills, MIT.
More from Jack-WebDev/skills
- 0.565score
branch-name
Jack-WebDev
Generate one concise Git branch name based on the actual changes made.
SkillAFreshness: AClaude Code +9 - 0.565score
single-commit-message
Jack-WebDev
Generate one clear commit message based on the actual changes made.
SkillAFreshness: AClaude Code +9 - 0.561score
golang-best-practices
Jack-WebDev
Apply idiomatic Go best practices when writing, reviewing, refactoring, or designing Go code.
SkillAFreshness: AClaude Code +9 - 0.561score
typescript-best-practices
Jack-WebDev
Apply version-aware TypeScript practices when implementing, reviewing, or refactoring TypeScript or TSX code in any application or library.
SkillAFreshness: AClaude Code +9 - 0.561score
layman-it
Jack-WebDev
Rewrite comments, documentation, explanations, PR text, TODOs, and other developer-facing text in simple language that a non-expert can understand.
SkillAFreshness: AClaude Code +9 - 0.561score
tanstack-router-best-practices
Jack-WebDev
Apply TanStack Router best practices when creating, modifying, reviewing, or debugging routes, navigation, search params, loaders, route context…
SkillAFreshness: AClaude Code +9 - 0.561score
code-engineering
Jack-WebDev
Apply general production engineering standards when implementing, fixing, reviewing, or refactoring code in any language or framework.
SkillAFreshness: AClaude Code +9 - 0.555score
tanstack-query-best-practices
Jack-WebDev
Use when writing, modifying, reviewing, or debugging TanStack Query code, including queries, mutations, query keys, caching, invalidation, prefetching…
SkillAFreshness: AClaude Code +9 - 0.555score
vitest-best-practices
Jack-WebDev
Use when writing, modifying, reviewing, or debugging Vitest tests, test configuration, mocks, spies, fixtures, setup files, coverage, test projects, async…
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 29, 2026 (1 month ago)
- Last release
- Oct 3, 2026 (26 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Jack-WebDev/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Jack-WebDev
- 0.565score
branch-name
Jack-WebDev
Generate one concise Git branch name based on the actual changes made.
SkillAFreshness: AClaude Code +9 - 0.565score
single-commit-message
Jack-WebDev
Generate one clear commit message based on the actual changes made.
SkillAFreshness: AClaude Code +9 - 0.561score
golang-best-practices
Jack-WebDev
Apply idiomatic Go best practices when writing, reviewing, refactoring, or designing Go code.
SkillAFreshness: AClaude Code +9 - 0.561score
typescript-best-practices
Jack-WebDev
Apply version-aware TypeScript practices when implementing, reviewing, or refactoring TypeScript or TSX code in any application or library.
SkillAFreshness: AClaude Code +9 - 0.561score
layman-it
Jack-WebDev
Rewrite comments, documentation, explanations, PR text, TODOs, and other developer-facing text in simple language that a non-expert can understand.
SkillAFreshness: AClaude Code +9 - 0.561score
tanstack-router-best-practices
Jack-WebDev
Apply TanStack Router best practices when creating, modifying, reviewing, or debugging routes, navigation, search params, loaders, route context…
SkillAFreshness: AClaude Code +9
Cite this page
react-best-practices skill. Agent Mart. https://agentmart.dev/skills/jack-webdev-react-best-practices (last updated 2026-10-24)