react-components-state
Skill4 starsChanged 2 months agoApache-2.0View on GitHub
Implement or review React components, state ownership, effects, hooks, composition, and forms. Use only in React; do not apply React patterns to Svelte.
In this repository81 other files it gives its agents.
- agent-cli-designSkill
- agent-tool-boundariesSkill
- behavior-first-implementationSkill
- bounded-prototypeSkill
- bounded-pr-sliceSkill
- building-fdd-validationSkill
- context-efficiencySkill
- cross-language-contractsSkill
- cross-platform-agent-instructionsSkill
- design-interviewSkill
- diagnosis-loopSkill
- domain-languageSkill
- edge-cloud-syncSkill
- handoff-continuitySkill
- immutable-pr-reviewSkill
- memory-context-hygieneSkill
- module-designSkill
- orchestrateSkill
- owner-decision-gateSkill
- parallel-portfolioSkill
- pr-gate-loopSkill
- pyo3-async-lifecycleSkill
- pyo3-buffer-performanceSkill
- pyo3-free-threadingSkill
- pyo3-ownership-errorsSkill
- pyo3-wheel-releaseSkill
- python-api-typingSkill
- python-async-concurrencySkill
- python-ci-releaseSkill
- python-data-boundariesSkill
- python-packaging-environmentsSkill
- python-performanceSkill
- python-pytestSkill
- python-reviewSkill
- python-test-designSkill
- python-threading-workersSkill
- python-workflowSkill
- react-performanceSkill
- repository-groundingSkill
- rust-api-designSkill
- rust-async-concurrencySkill
- rust-build-diagnosticsSkill
- rust-ci-releaseSkill
- rust-memory-layoutSkill
- rust-nextestSkill
- rust-numerics-simdSkill
- rust-performanceSkill
- rust-protocol-codecsSkill
- rust-python-bindingsSkill
- rust-reviewSkill
- rust-storage-durabilitySkill
- rust-test-designSkill
- rust-unsafe-ffiSkill
- rust-workflowSkill
- rust-workspace-dependenciesSkill
- shadcn-react-componentsSkill
- shadcn-svelte-componentsSkill
- simplify-existing-codeSkill
- source-verificationSkill
- svelte-components-runesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Keep render logic pure. Put user-triggered actions in event handlers and use effects to synchronize with external systems.
- Very specific: line 22
Prefer a small typed component API with native semantics and explicit variants.
- Very specific: line 41
Test the user-visible outcome with the project's renderer and use browser evidence for focus, layout, or other behavior its DOM emulator …
- Distinctive: line 47
Read practice notes and sources only when the task needs more depth.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Components and State
Choose one owner
Determine which state comes from the server, URL, local interaction, or editable draft. Use the existing query/router/store patterns. Derive display values from their inputs instead of copying them into state and synchronizing with another effect. Keep state near the component that owns it; lift only what cooperating components actually share.
Keep render logic pure. Put user-triggered actions in event handlers and use effects to synchronize with external systems. Effects must handle changing dependencies and clean up subscriptions. Fix stale closures rather than suppressing hook dependency checks. Development Strict Mode should expose lifecycle problems, not be disabled to conceal them.
Compose for a concrete use
Prefer a small typed component API with native semantics and explicit variants. Use compound
components or shared context when they simplify a real family of interactions, not for every
button. Native booleans such as disabled are fine; avoid combinatorial mode flags that allow
contradictory states. Preserve identity with meaningful keys. Do not define component types
inside render when their remounting would lose state or focus.
Reuse the installed shadcn/local primitive APIs and preserve ref, event, and accessibility props across wrappers. Do not nest buttons or replace a link with click-only text. Keep controlled input values and validation feedback coherent through loading, failed submit, and reset.
Respect runtime and version
React 19 support does not mean React Compiler is enabled, nor that a Vite SPA has Server
Components. Do not import Next.js APIs or replace valid useContext/ref patterns en masse
because a community skill prefers newer syntax. Inspect actual compatibility requirements.
Validate behavior
Exercise changing props, reorder/remove, keyboard use, failed async work, and mount/unmount.
Test the user-visible outcome with the project's renderer and use browser evidence for focus,
layout, or other behavior its DOM emulator does not model reliably. Reach for react-performance
only when render cost or subscriptions are the actual issue.
Further guidance
Read practice notes and sources only when the task needs more depth.
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.

