Files
gps-denied-onboard/.claude/rules/react.mdc
T
Yuzviak 6ff14a1a7d chore: import .claude command skills, CLAUDE.md, .gitignore, next_steps.md
- Vendor local .claude/ command skills (autopilot, plan, implement, etc.)
- Add CLAUDE.md pointing slash commands to .claude/commands/*/SKILL.md
- Untrack docs-Lokal/ and ignore .planning/ for local-only planning docs
- Include next_steps.md pulled from upstream

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 21:39:43 +03:00

18 lines
903 B
Plaintext

---
description: "React/TypeScript/Tailwind conventions: components, hooks, strict typing, utility-first styling"
globs: ["**/*.tsx", "**/*.jsx", "**/*.ts", "**/*.css"]
---
# React / TypeScript / Tailwind
- Use TypeScript strict mode; define `Props` interface for every component
- Use named exports, not default exports
- Functional components only; use hooks for state/side effects
- Server Components by default; add `"use client"` only when needed (if Next.js)
- Use Tailwind utility classes for styling; no CSS modules or inline styles
- Name event handlers `handle[Action]` (e.g., `handleSubmit`)
- Use `React.memo` for expensive pure components
- Implement lazy loading for routes (`React.lazy` + `Suspense`)
- Organize by feature: `components/`, `hooks/`, `lib/`, `types/`
- Never use `any`; prefer unknown + type narrowing
- Use `useCallback`/`useMemo` only when there's a measured perf issue