Loading...
Loading...
Found 5 Skills
React Suspense for data fetching, code splitting, and async operations. Covers Suspense boundaries, lazy loading, streaming SSR, Error Boundaries, suspense-enabled data libraries, and progressive loading patterns. USE WHEN: user mentions "Suspense", "lazy loading", "React.lazy", "code splitting", "streaming SSR", "loading states", asks about "async components", "fallback UI" DO NOT USE FOR: React 17 and earlier (limited Suspense support), Class components, Non-React frameworks
Import parts of your code on demand using dynamic import() to reduce initial bundle size.
Guide for choosing between Server Components and Client Components in Next.js App Router. CRITICAL for useSearchParams (requires Suspense + 'use client'), navigation (Link, redirect, useRouter), cookies/headers access, and 'use client' directive. Activates when prompt mentions useSearchParams, Suspense, navigation, routing, Link component, redirect, pathname, searchParams, cookies, headers, async components, or 'use client'. Essential for avoiding mixing server/client APIs.
Use loading.tsx files and React Suspense to split data fetching across multiple async components with skeleton loaders. Each page.tsx gets a matching loading.tsx, and async data components are wrapped in Suspense boundaries with skeleton fallbacks that mimic component design using the Skeleton UI.
Dynamically load components based on the current route to reduce initial bundle size.