code-splitting
CommunityReduce bundle size with React 19 code splitting.
Software Engineering#suspense#react#bundle size#performance optimization#lazy loading#code splitting#react 19
Authordjankies
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Large JavaScript bundles slow down initial page load, impacting user experience, SEO, and overall application performance. This Skill provides strategies to reduce bundle size by loading code only when needed.
Core Features & Use Cases
- Basic Pattern: Implement lazy loading for components using
lazy()andSuspense. - Route-Based Splitting: Optimize initial load by splitting code per route, loading only the necessary components for the current page.
- Component-Based Splitting: Lazy load specific components (e.g., charts, tables) only when they become visible or are explicitly requested.
- Use Case: Implement code splitting for the
/adminroute in your application, ensuring the large admin dashboard component is only loaded when a user navigates to that specific route, improving initial load times for other pages.
Quick Start
Apply code splitting to the src/components/Chart.js component using lazy() and Suspense so it loads only when visible.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: code-splitting Download link: https://github.com/djankies/claude-configs/archive/main.zip#code-splitting Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.