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.
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
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.