- Default to Server Components in
app/
, only using Client Components with'use client'
if they use hooks likeuseState
oruseRouter
, or DOM interactions. - Fetching data in Server Components: use
fetch()
, avoiduseEffect
. - For TypeScript: Enforce interfaces and types for all props and state.
- Nest
layout.tsx
files for consistent UI across sections. - For async operations: prefer
async/await
, add appropriate error handling and UI loading states.
Created
August 27, 2024 00:30
-
-
Save digitarald/6f76a290e52875d08bf269833b737274 to your computer and use it in GitHub Desktop.
Next.JS App Router - Copilot Custom Instructions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment