reactjs

Enforces React clean code standards for functional components, routing, and data fetching.

1|Updated Jul 18, 2025
One-click install
npx skills add https://github.com/AdelysAlberto/md-configs-and-agents --skill reactjs-adelysalberto
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reactjs
Source: https://github.com/AdelysAlberto/md-configs-and-agents/tree/main/agents-hermes/skills/reactjs
Command: npx skills add https://github.com/AdelysAlberto/md-configs-and-agents --skill reactjs-adelysalberto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? React codebases often drift into inconsistent patterns: class components mixed with hooks, ad-hoc routing in App.tsx, and direct fetch calls scattered across UI components. This Skill provides a single set of enforceable standards so every component, route, and query follows the same architecture. ## Core Features & Use Cases - Component Standards: Mandates pure functional components with direct prop typing, CSS Modules, Biome linting, and i18n via t('key'), banning React.FC and inline styles. - Modular Navigation: Defines a mandatory src/navigation/ structure with paths constants, PrivateRoute/PublicRoute guards, lazy-loaded route objects, and a minimal App.tsx. - Data Fetching & Error Handling: Requires TanStack Query custom hooks per module with cache invalidation, plus a root ErrorBoundary to catch runtime rendering exceptions. - Use Case: When scaffolding a new users module, apply this Skill to generate the page component, lazy route entry, useUsersQuery hook, and mutation with query invalidation, all matching team conventions. ## Quick Start Apply the reactjs skill to review my src/modules/users code and refactor it to match the clean code standards.

Frequently Asked Questions about reactjs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure React Router routes in a scalable way?▼

Place all routing in a src/navigation directory with a paths.ts constants file, PrivateRoute and PublicRoute guards, and separate private.routes.tsx and public.routes.tsx files using lazy imports. Expose an AppRoutes component via useRoutes so App.tsx stays minimal.

How to fetch API data in React without useEffect?▼

Use TanStack Query custom hooks per module instead of useEffect or direct fetch calls in components. Define useQuery hooks for reads and useMutation hooks with queryClient.invalidateQueries for writes, keeping components free of data-fetching logic.

Should I use React.FC for typing functional components?▼

No, this standard prohibits React.FC and React.FunctionComponent. Type props directly in the destructured argument, for example ({ title, children }: Props), which gives cleaner inference and avoids implicit children typing issues.

Does React still need class components for error boundaries?▼

Yes, ErrorBoundary is the one allowed exception to the no-class rule because React requires getDerivedStateFromError and componentDidCatch, which only exist on class components. Mount it at the application root to catch runtime rendering errors.

Why is using useEffect to sync derived state an anti-pattern?▼

Deriving state with useEffect causes extra renders and stale-value bugs. Compute derived values directly during render, such as const fullName = firstName + ' ' + lastName, so the value always stays consistent with its source state.