React and Next.js performance optimization guidelines from Vercel Engineering. Use when writing, reviewing, or refactoring React/Next.js code in StarMapper — especially MapLibre components, data fetching, and bundle optimization.
Instalación
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
React and Next.js performance optimization guidelines from Vercel Engineering. Use when writing, reviewing, or refactoring React/Next.js code in StarMapper — especially MapLibre components, data fetching, and bundle optimization.
js-early-exit — Return early from geocoding functions
StarMapper-Specific Notes
MapLibre GL bundle (~900KB) is the single biggest bundle concern. Dynamic import with ssr:false is mandatory and already in place via stargazer-map-dynamic.tsx.
Chunk loop state accumulates progressively — setPoints(prev => [...prev, ...newPoints]) is correct functional setState pattern.
GeoJSON construction is O(n) with n=stars — useMemo on points array is important for large repos.
Vercel free = no Edge Runtime needed — standard Node.js serverless functions work fine.