From react-development
React-specific development patterns including hooks (useState, useEffect, useReducer, useContext), component architecture, state management, shadcn/ui integration, JSX/TSX, React testing, and Bulletproof React auditing. NOT for Next.js routing, SSR, or server components (use nextjs-development). NOT for CSS design systems, Tailwind utilities, or accessibility patterns (use frontend-design).
npx claudepluginhub viktorbezdek/skillstack --plugin react-developmentThis skill uses the workspace's default tool permissions.
A comprehensive skill for building modern React applications, covering component architecture, hooks optimization, Next.js patterns, and code quality auditing.
examples/bulletproof-sample_audit_report.mdexamples/hooks-anti-patterns.tsxexamples/hooks-good-patterns.tsxreferences/bulletproof-audit_criteria.mdreferences/bulletproof-severity_matrix.mdreferences/extended-patterns.mdreferences/fpkit-builder-accessibility-patterns.mdreferences/fpkit-builder-component-patterns.mdreferences/fpkit-builder-composition-patterns.mdreferences/fpkit-builder-css-variable-guide.mdreferences/fpkit-builder-storybook-patterns.mdreferences/fpkit-builder-testing-patterns.mdreferences/fpkit-dev-accessibility.mdreferences/fpkit-dev-architecture.mdreferences/fpkit-dev-composition.mdreferences/fpkit-dev-css-variables.mdreferences/fpkit-dev-storybook.mdreferences/fpkit-dev-testing.mdreferences/hooks-custom-hooks.mdreferences/hooks-dependency-array.mdGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Compresses source documents into lossless, LLM-optimized distillates preserving all facts and relationships. Use for 'distill documents' or 'create distillate' requests.
A comprehensive skill for building modern React applications, covering component architecture, hooks optimization, Next.js patterns, and code quality auditing.
This skill combines expertise from 7 specialized React development skills:
Use this skill when:
What are you building?
|
+-- Full-stack Next.js app?
| --> See: Next.js Architecture (Section 1)
|
+-- Component library?
| +-- Using shadcn/ui? --> See: shadcn/ui Patterns (Section 2)
| +-- Using fpkit? --> See: fpkit Patterns (references/extended-patterns.md)
|
+-- Optimizing existing React code?
| +-- Hooks issues? --> See: Hooks Best Practices (Section 3)
| +-- Architecture audit? --> See: Bulletproof Audit (references/extended-patterns.md)
Types --> Services --> Hooks --> Components --> Pages
src/
types/ # TypeScript interfaces (database.types.ts)
lib/services/ # Server-side data access (users.service.ts)
hooks/ # Client-side data hooks (use-users.ts)
components/ # UI components (user-card.tsx)
app/ # Routes and pages (app/users/page.tsx)
Services Layer (Server-side only):
// lib/services/users.service.ts
import { createClient } from '@/lib/supabase/server'
export async function getUsers() {
const supabase = await createClient()
const { data, error } = await supabase.from('users').select('*')
if (error) throw error
return data
}
Hooks Layer (Client-side):
// hooks/use-users.ts
'use client'
import { useQuery } from '@tanstack/react-query'
export function useUsers() {
return useQuery({
queryKey: ['users'],
queryFn: () => fetch('/api/users').then(r => r.json())
})
}
import { cva, type VariantProps } from 'class-variance-authority'
const buttonVariants = cva(
'inline-flex items-center justify-center rounded-md text-sm font-medium',
{
variants: {
variant: {
default: 'bg-primary text-primary-foreground',
secondary: 'bg-secondary text-secondary-foreground',
outline: 'border border-input bg-background',
},
size: {
default: 'h-10 px-4 py-2',
sm: 'h-9 rounded-md px-3',
lg: 'h-11 rounded-md px-8',
},
},
defaultVariants: { variant: 'default', size: 'default' },
}
)
scripts/shadcn-setup-tailwind.py - Generate Tailwind config with shadcn defaultsscripts/shadcn-generate-component.py - Scaffold new shadcn-style components"The best hook is the one you don't need to write."
Derived State: Don't use useState + useEffect for derived values. Calculate during render instead.
Event Response: Don't use useEffect for user actions. Handle in event handlers directly.
Props-to-State: Don't sync props to state. Use key prop for component reset.
Premature Memoization: Don't useMemo/useCallback cheap operations. Just calculate them.
Only use useMemo/useCallback when:
See Extended Patterns for fpkit component development, Bulletproof React auditing, detailed hooks anti-patterns, templates, and complete file reference.