react-vite-guide
React 19 + Vite Guide
Comprehensive guidelines for building React 19 SPA applications with Vite. Combines composition patterns, performance optimization, and web interface best practices into a single reference optimized for AI agent workflows.
Tech Stack
- React 19 —
use(), ref as prop, React Compiler support - Vite —
React.lazy()+ dynamicimport(), env variables, HMR - TypeScript — strict mode recommended
- Pure SPA (CSR) — no SSR, no hydration concerns
Capability Index
1. Composition Patterns (references/composition-patterns.md)
Component architecture and state management patterns for scalable React apps.
| Priority | Category | Impact |
|---|---|---|
| 1 | Component Architecture | HIGH |
| 2 | State Management | MEDIUM |
| 3 | Implementation Patterns | MEDIUM |
| 4 | React 19 APIs | MEDIUM |
Key topics:
- Boolean prop proliferation vs composition alternatives
- Compound components with shared context
- State management decoupled from UI via providers
- Generic context interfaces (state/actions/meta)
- State lifted into providers for sibling access
- Explicit component variants vs boolean modes
- Children vs render props
- React 19:
use()replacesuseContext(), ref as regular prop
2. Performance Optimization (references/performance-optimization.md)
Performance optimization patterns adapted for Vite + React 19 SPA. Next.js-specific patterns removed; Vite equivalents provided.
| Priority | Category | Impact |
|---|---|---|
| 1 | Async Optimization | CRITICAL |
| 2 | Bundle Size | CRITICAL |
| 3 | Client-Side Data Fetching | MEDIUM-HIGH |
| 4 | Re-render Optimization | MEDIUM |
| 5 | Rendering Performance | MEDIUM |
| 6 | JavaScript Performance | LOW-MEDIUM |
| 7 | Advanced Patterns | LOW |
Key topics:
Promise.all()and dependency-based parallelizationReact.lazy()+Suspensefor code splitting (Vite)- Barrel file import cost and direct imports
- Hover/focus preloading for perceived speed
- SWR for client-side data deduplication
- Functional
setState, lazy state initialization useTransitionfor non-urgent updatescontent-visibility: autofor long listsuseReffor transient values- Module-level caching patterns
3. Web Interface (references/web-interface.md)
UI/UX patterns for accessibility, forms, animation, performance, and content quality.
| Category | Focus |
|---|---|
| Accessibility | ARIA, semantic HTML, keyboard handlers |
| Focus States | focus-visible, no bare outline-none |
| Forms | autocomplete, correct type, paste allowed |
| Animation | prefers-reduced-motion, compositor-only props |
| Typography | Ellipsis, curly quotes, tabular-nums |
| Content Handling | Truncation, empty states, long content |
| Images | Explicit dimensions, lazy loading |
| Performance | Virtualization, no layout reads in render |
| Navigation & State | URL reflects state, deep-linkable UI |
| Touch & Interaction | touch-action, overscroll-behavior |
| Dark Mode | color-scheme, theme-color meta |
| Locale & i18n | Intl.DateTimeFormat, Intl.NumberFormat |
4. Vite-Specific Patterns (references/vite-specific.md)
Vite-specific configuration, conventions, and optimization patterns.
Key topics:
- Dynamic imports and code splitting with Vite
- Environment variables (
import.meta.env) - Vite plugin ecosystem (React SWC/Babel)
- Build optimization (
manualChunks,rollupOptions) - Alias and path resolution
- CSS Modules / Tailwind CSS integration
More from buyoung/skills
agents-md-generator
Analyze repository structure and generate or update standardized AGENTS.md files that serve as contributor guides for AI agents. Supports both single-repo and monorepo structures. Measures LOC to determine character limits and produces structured documents covering overview, folder structure, patterns, conventions, and working agreements. Update mode refreshes only the standard sections while preserving user-defined custom sections. Use when setting up a new repository, onboarding AI agents to an existing codebase, updating an existing AGENTS.md, or when the user mentions AGENTS.md.
27jetbrains-vmoptions
>
18kysely-converter
Capable of converting raw SQL queries into type-safe Kysely TypeScript code. Knows how to handle various SQL dialects and complex query structures.
14code-review
Performs production-ready code reviews on git changes. Supports commit/range/file-scoped analysis, impact assessment, breaking-change detection, confidence-aware finding classification, and risk-weighted verdict generation.
13ux-design-guide
Reviews existing UI for UX guideline violations and generates implementation guidance based on 99+ rules across Navigation, Layout, Accessibility, Forms, Performance, Typography, and more. Supports Web, Mobile, and Desktop GUI platforms. Use when the user requests a UX review, UX audit, UI accessibility check, or implementation guidance for user experience best practices.
1system-prompt-creator
A skill that analyzes user requirements to generate production-ready system prompts. It determines whether a single or multi-prompt architecture is needed and queries for missing information if requirements are insufficient.
1