react-spa-performance

Optimizes React Vite SPA builds, rendering, and media loading for better runtime responsiveness.

37|6|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/carrotwaxr/peek-stash-browser --skill react-spa-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-spa-performance
Source: https://github.com/carrotwaxr/peek-stash-browser/tree/main/.claude/skills/react-spa-performance
Command: npx skills add https://github.com/carrotwaxr/peek-stash-browser --skill react-spa-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide eliminates common performance regressions and slow user experiences in React 19 + Vite 7 single-page applications by providing prescriptive optimizations across build, runtime, and media handling.

Core Features & Use Cases

  • Build Optimization: Manual chunking, optimizeDeps, target configuration, and minifier choices to reduce initial bundle size.
  • Code Splitting & Lazy Loading: Route-level splitting, dynamic imports, and preload strategies to defer heavy libraries like video.js and charting libs.
  • Render Efficiency: Re-render prevention patterns, memoization guidance with React Compiler, state placement, and context splitting to minimize unnecessary updates.
  • Data & Media: TanStack Query tuning, prefetch strategies, virtualization for long lists, and best practices for responsive images and video initialization.
  • Bundle Analysis & Dev Workflow: Tools and CI checks to monitor asset size regressions and maintain fast HMR and developer feedback loops.
  • Use Case: Audit a Vite React SPA (for example the client/ directory of peek-stash-browser) to produce prioritized fixes that improve cold-load time, runtime responsiveness, and media playback performance.

Quick Start

Analyze the client/ Vite React 19 project and produce prioritized, actionable optimizations for build config, code splitting, re-render hotspots, TanStack Query settings, and media loading.

Frequently Asked Questions about react-spa-performance

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

FAQPage Schema
How do I optimize React Vite SPA performance and reduce bundle size?

Optimize React Vite SPA performance by configuring manualChunks and optimizeDeps, implementing route-level code splitting, and applying memoization patterns to reduce initial bundle size and prevent unnecessary re-renders.

What is the best way to prevent unnecessary re-renders in React 19?

Prevent unnecessary re-renders in React 19 by applying memoization guidance with the React Compiler, optimizing state placement, and splitting context to minimize component updates across the render tree.

How do I configure TanStack Query for data prefetching in a single-page application?

Configure TanStack Query for data prefetching in a single-page application by tuning its settings and applying prefetch strategies to improve runtime responsiveness and data fetching efficiency across route transitions.

How to use route-level code splitting and dynamic imports in Vite 7?

Use route-level code splitting and dynamic imports in Vite 7 by configuring preload strategies to defer heavy libraries like video.js and charting libraries, significantly improving initial load times.

Does this React performance optimization guide work for single-page applications without SSR?

Yes, this React performance optimization guide specifically targets Vite 7 React 19 single-page applications without SSR, focusing on refactoring components, routes, data fetching, and build configuration.

Why are my Vite React SPA cold-load times slow despite using code splitting?

Slow Vite React SPA cold-load times persist despite code splitting when manualChunks, optimizeDeps, target configuration, and minifier choices are unoptimized, or when asset loading and media initialization lack best practices.