Nextjs

Next.js App Router rules and architecture.

LuisSambrano Updated 8 repo stars

File contents

Next.js Protocol

Routing

  • Strictly use the app/ router.
  • Use loading.tsx and error.tsx for graceful degradation.

Data Fetching

  • Fetch data in Server Components (async function Page()).
  • Avoid useEffect for data fetching; use SWR or React Query only for mutations or real-time polling on the client.

Mutations

  • Use Server Actions for all POST/PUT/DELETE operations.

LuisSambrano/antigravity-config commit a6e2f08590

Frequently asked questions

npx get-skill add luissambrano/nextjs