Next.js
Features
- Hybrid rendering = Server-side rendering + Static site generation
- Automatic Code Splitting
- Built-in CSS and SASS support + TypeScript support
- Image Optimization
- Edge & Middleware support
- Hot reloading
- SEO Friendly
- Incremental Static Regeneration
- Easy deployment with Vercel
- API Routes with folder's structure
[dynamic id]
[...multiple match]
(collocation)
_private
Use cases
- E-commerce websites
- Blogs and content-driven sites
- Dashboard and admin panels
- Marketing and landing pages
- Applications requiring dynamic and static content mix
Install & Setup
# Create a new Next.js app
npx create-next-app@latest my-next-app
cd my-next-app
# Start the development server
npm run dev
Project Structures
Next 13+
my-next-app/
├── node_modules/
├── public/
├── app/
│ └── layout.tsx
│ └── page.tsx
├── styles/
│ └── globals.css
├── .gitignore
├── package.json
└── README.md
Fundamental
Routing
App folder structure