react-ui
Guidance for building, redesigning, or reviewing React TSX pages/components, hooks, state management, styling, routing, accessibility, and Testing Library…
Skill by prachwal-archive
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/prachwal-archive-react-ui
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, testing
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-ui
What's inside
- Skill name
react-ui- Description
- Guidance for building, redesigning, or reviewing React TSX pages/components, hooks, state management, styling, routing, accessibility, and Testing Library coverage.
- License
- MIT
- Instructions
- 99 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# React UI
Use this skill when building or reviewing React components, pages, layouts, or design system elements.
## Component conventions
- Use function components with hooks. Avoid class components for new code.
- Type props with `interface` or `type`. Prefer `interface` for public component APIs.
- Use `React.PropsWithChildren` or explicit `children: React.ReactNode` prop.
- Keep components focused: one file per component unless closely related.
- Use `React.memo` sparingly — profile first.
- Use `React.forwardRef` when a component needs to expose a DOM ref to the parent.
- Use `React.useId` for generating accessible unique IDs (avoid random keys).
- Prefer composition over prop flags when a component starts growing into multiple modes.
- Keep presentational components pure; move data fetching and state orchestration up a level.
- Derive values in render when they are cheap and deterministic; do not store derived state.
## Hooks patterns
```tsx
// Custom hook for encapsulating logic
function useHeroData() {
const { data, isLoading, isError } = useGetHeroDataQuery()
return { hero: data, loading: isLoading, error: isError }
}
// State with useReducer for complex transitions
type FormState = { name: string; email: string; errors: Record<string, string> }
type FormAction =
| { type: 'SET_FIELD'; field: string; value: string }
| { type: 'SET_ERRORS'; errors: Record<string, string> }
function formReducer(state: FormState, action: FormAction): FormState { … }
```
## Common component patterns
- Container/page component: fetch data, map it into props, and handle loading/error branches.
- Presentational component: accept data via props and render with no side effects.
- Form component: own local state, validation, and submit wiring.
- Layout component: compose header/sidebar/footer and keep route content via `children` or `Outlet`.
## State management
- Use `useState` for local component state.
- Use `useReducer` for complex state logic (multi-field forms, wizards).
- For global state, follow the project's chosen library: Redux Toolkit, Zustand, Jotai, Context, or the app's existing store pattern.
- Prefer lifting state up over adding global state.
- Use `useEffect` only for synchronization with external systems — not for derived state.
- Use `useMemo` / `useCallback` only when profiling shows a bottleneck.
## Side effects
- `useEffect` dependencies should be explicit — avoid `[]` unless the effect truly runs once.
- Clean up subscriptions, event listeners, and AbortController in the effect return.
- Use `useLayoutEffect` only when you need synchronous DOM measurement before paint.
- Keep effects focused: one concern per `useEffect`, not a single massive effect.
## Styling
- Follow the project's styling approach: CSS Modules, Tailwind, SCSS, CSS-in-JS, or UI library (Ant Design, MUI, etc.).
- Keep styling consistent with the project's design system.
- Use `className` with the project's naming convention.
- Prefer semantic layout primitives (`main`, `section`, `header`, `nav`, `aside`, `footer`) before absolute positioning.
- For CSS-in-JS, prefer runtime-free solutions (vanilla-extract, Panda CSS) over runtime ones.
## Routing
- Use React Router or the project's declared routing library.
- Keep route definitions in a central file or layout.
- Lazy-load route components with `React.lazy` + `<Suspense>`.
- Use route loaders / actions (React Router v6.4+) for data loading at the route level.
## Testing
- Use Testing Library React for component tests.
- Use `renderWithProviders` or equivalent wrapper that includes providers (store, router, theme).
- Mock external dependencies (API hooks, auth) with `vi.mock` or `jest.mock`.
- Test loading, error, empty, and success states.
- Prefer `screen.getByRole` and `screen.getByLabelText` over test IDs.
- Use `userEvent` over `fireEvent` for more realistic interaction simulation.
- Assert visible outcomes, not implementation details or internal state.
- For complex UI branches, test the smallest component that owns the branch.
## Accessibility
- Use `useRef` + `.focus()` for programmatic focus management after state changes.
- Prefer `<></>` fragments over wrapper `<div>` to avoid polluting landmark structure.
- Declare `aria-live` regions in the root layout, not in leaf components.
- Use `aria-*` props directly on native elements — React supports them natively.
- For modals: trap focus, restore focus on close.
## Verification
- Run the project's test command after changes.
- Run the build command for broad page or routing changes.
- Check accessibility: keyboard navigation, focus management, screen reader semantics.From prachwal-archive/web-ui-skills, MIT.
More from prachwal-archive/web-ui-skills
- 0.502score
a11y-review
prachwal-archive
Use when reviewing web interfaces for accessibility, including WCAG 2.2 mapping, ARIA misuse, keyboard access, focus management, responsive/mobile behavior…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
docs-instructions
prachwal-archive
Use when maintaining repository Markdown, Copilot instructions, Codex AGENTS.md, repo skills, prompts, or LLM evaluation tasks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
react-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in React apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
preact-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in Preact apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
project-tooling
prachwal-archive
Tooling guidance for Vite, Vitest, TypeScript, ESLint/Biome, package scripts, path aliases, and build/test tooling.
SkillCFreshness: C★ 1Claude Code +9 - 0.437score
netlify-database-security
prachwal-archive
Use when connecting Netlify backend APIs to databases and you need secure runtime env handling, least privilege, safe data access patterns, and storage…
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
netlify-serverless
prachwal-archive
Use when choosing and operating Netlify's serverless execution primitives.
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
netlify-typescript-api
prachwal-archive
Use when designing or implementing TypeScript backend APIs on Netlify, including handler structure, validation, typed contracts, error envelopes, and testable…
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
preact-ui
prachwal-archive
Use when designing, refactoring, or reviewing Preact pages and components, including component structure, MVVM architecture, signals, hooks, forms, routing…
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
typescript-fundamentals
prachwal-archive
Use when designing or reviewing TypeScript code structure, type safety, patterns, JSDoc, naming conventions, formatting, and module organization.
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
eslint-config
prachwal-archive
Use when setting up, extending, or fixing ESLint configuration for TypeScript projects, including flat config, Preact/React, Node.js, Netlify Functions, and…
SkillDFreshness: D★ 1Claude Code +9 - 0.437score
mongodb-netlify
prachwal-archive
Use when building Netlify Functions or full-stack apps that use MongoDB Atlas or MongoDB-compatible deployments.
SkillDFreshness: D★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 22, 2026 (5 months ago)
- Last release
- Apr 23, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from prachwal-archive
- 0.502score
a11y-review
prachwal-archive
Use when reviewing web interfaces for accessibility, including WCAG 2.2 mapping, ARIA misuse, keyboard access, focus management, responsive/mobile behavior…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
react-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in React apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
docs-instructions
prachwal-archive
Use when maintaining repository Markdown, Copilot instructions, Codex AGENTS.md, repo skills, prompts, or LLM evaluation tasks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
preact-a11y
prachwal-archive
Use when designing, implementing, testing, or reviewing accessibility in Preact apps — semantic HTML, ARIA, keyboard flow, focus management, forms, contrast…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
project-tooling
prachwal-archive
Tooling guidance for Vite, Vitest, TypeScript, ESLint/Biome, package scripts, path aliases, and build/test tooling.
SkillCFreshness: C★ 1Claude Code +9 - 0.437score
neon-netlify
prachwal-archive
Use when building Netlify apps or APIs with Neon Postgres.
SkillDFreshness: D★ 1Claude Code +9
Cite this page
react-ui skill. Agent Mart. https://agentmart.dev/skills/prachwal-archive-react-ui (last updated 2026-10-24)