architecture-react-nextjs
Installation
SKILL.md
Architecture: React & Next.js Performance
Purpose
This skill establishes strict architectural guidelines for React 19 and Next.js 15. It focuses heavily on performance, rendering strategies, and avoiding common React anti-patterns. It works alongside web-interface-guidelines.md (which handles UI/UX) and nextjs-heroui-frontend.md (which handles components).
When to Use
- Gate 3 (PLAN): When designing the component tree, data fetching strategies, or deciding between Client/Server components.
- Gate 4 (IMPLEMENT): When optimizing renders, managing state, or fixing hydration issues.
Core React Doctrine (Non-Negotiable)
1. Eliminating Waterfalls (CRITICAL)
- Never nest sequential
awaitcalls for independent data in Server Components. - Use
Promise.allto fetch parallel data simultaneously. - If data depends on previous data, fetch the absolute minimum required first, then parallelize the rest.