Next.js Guide
react
nextjs
server-side rendering
static site generation
Installation
File-based Routing
pages/index.js
→/
pages/about.js
→/about
pages/blog/[slug].js
→/blog/:slug
Dynamic Routes
Link Component
Image Component
API Routes
getServerSideProps (Server-Side Rendering)
getStaticProps (Static Site Generation)
getStaticPaths (for Dynamic Routes)
Custom App
Custom Document
Environment Variables
.env.local
for local environment variables- Use
process.env.NEXT_PUBLIC_VARIABLE_NAME
for client-side variables
CSS Modules
Remember, Next.js is constantly evolving. Always refer to the official Next.js documentation for the most up-to-date information and best practices.