review-react
Skill1k starsChanged 8 months agoMITView on GitHub
React code review guidelines covering Rules of React, re-render optimization, rendering performance, and advanced patterns. Activates when writing, reviewing, or refactoring React components, hooks, or state management code.
3 other projects use a version of this.
Trending
Quiet since December.thin dataabout the whole repository
Most recently taken up by
- mxrsv/agents-skillstheir own version, first seen Nov 29, 2026
- nielsmadan/skillstheir own version, first seen Nov 8, 2026
- nesnilnehc/ai-cortextheir own version, first seen Oct 25, 2026
Who's talking about daangn/stackflow
- daangn/seed-design“feat: Stackflow cleanup”GitHub · Jan 7, 2025 · 2 reactions
- BioforestChain/KeyApp“chore(openspec): Add native navigation spec with Stackflow”GitHub · Dec 17, 2025
The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- mxrsv/agents-skills★ 11same name
- nesnilnehc/ai-cortex★ 8same name
- nielsmadan/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 71
When a CRITICAL rule violation is detected (e.g., react-rules-purity), fix it — do not rationalize exceptions.
- Distinctive: line 77
If you detect a violation, move to "fix" before moving to "judge severity." The cost of a false positive (unnecessary refactor) is far …
- Distinctive: line 85
Read individual rule files for detailed explanations and code examples:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Code Review Guidelines
Performance optimization and correctness guide for React applications. Contains 23 rules across 4 categories, prioritized by impact.
When to Apply
Reference these guidelines when:
- Writing or reviewing React components and hooks
- Optimizing re-render performance
- Refactoring state management or effect logic
- Reviewing pull requests that touch React code
Rule Categories by Priority
| Priority | Category | Impact | Prefix | Rules |
| 1 | Rules of React | CRITICAL | react-rules- | 3 |
| 2 | Re-render Optimization | MEDIUM | rerender- | 13 |
| 3 | Rendering Performance | MEDIUM | rendering- | 5 |
| 4 | Advanced Patterns | LOW | advanced- | 2 |
Quick Reference
1. Rules of React (CRITICAL)
react-rules-purity- Components and Hooks must be pure; no side effects during renderreact-rules-hooks- Only call Hooks at the top level and from React functionsreact-rules-calling- Never call components as functions or pass Hooks as values
2. Re-render Optimization (MEDIUM)
rerender-no-inline-components- Never define components inside other componentsrerender-derived-state-no-effect- Derive state during render, not in effectsrerender-memo- Extract memoized child components to avoid re-rendersrerender-memo-with-default-value- Hoist default non-primitive props outside memorerender-simple-expression-in-memo- Don't useMemo for simple primitive expressionsrerender-defer-reads- Don't subscribe to state only used in callbacksrerender-dependencies- Use primitive values in effect dependenciesrerender-derived-state- Subscribe to derived booleans, not raw objectsrerender-functional-setstate- Use functional setState for stable callbacksrerender-lazy-state-init- Pass initializer function to useState for expensive valuesrerender-move-effect-to-event- Move interaction logic from effects to event handlersrerender-transitions- Use startTransition for non-urgent state updatesrerender-use-ref-transient-values- Use refs for frequently-changing transient values
3. Rendering Performance (MEDIUM)
rendering-hoist-jsx- Hoist static JSX outside component functionsrendering-conditional-render- Use ternary operator instead of && for conditional renderingrendering-usetransition-loading- Prefer useTransition over manual loading staterendering-content-visibility- Use CSS content-visibility: auto for long listsrendering-activity- Use Activity component for preserving hidden UI state
4. Advanced Patterns (LOW)
advanced-event-handler-refs- Store latest event handlers in refs for stable callbacksadvanced-init-once- Initialize app-level singletons once, not per mount
Review Discipline
Never downgrade CRITICAL violations
When a CRITICAL rule violation is detected (e.g., react-rules-purity), fix it — do not rationalize exceptions. Common rationalizations to reject:
- "It's idempotent, so Strict Mode double-render is fine" — Strict Mode is not the only concern; Concurrent Mode render abandonment is the real danger.
- "It works in practice" — Concurrent features may not be active today but the code must be correct when they are.
- "Adding a comment explaining the intent is sufficient" — A comment does not prevent the bug. If the rule says "don't do X", the fix is to stop doing X.
If you detect a violation, move to "fix" before moving to "judge severity." The cost of a false positive (unnecessary refactor) is far lower than the cost of a false negative (shipping a Concurrent Mode bug).
Re-check after refactors
When a fix for one issue changes the code structure (e.g., adding callback to useEffect deps), re-run the full rule check on the modified code. A fix for one rule can regress another — e.g., fixing rerender-dependencies can reintroduce a react-rules-purity violation if it moves code back into render phase.
How to Use
Read individual rule files for detailed explanations and code examples:
rules/react-rules-purity.md
rules/rerender-no-inline-components.mdEach rule file contains:
- Brief explanation of why it matters
- Incorrect code example
- Correct code example
- Reference links
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

