This project demonstrates different rendering methods available in Next.js, including:
src/
āāā app/
ā āāā products-csr/ # Client-Side Rendering implementation
ā āāā products-ssr/ # Server-Side Rendering implementation
ā āāā products-ssg/ # Static Site Generation implementation
ā āāā products-isr/ # Incremental Static Regeneration implementation
ā āāā layout.tsx # Root layout with header and footer
ā āāā page.tsx # Home page with navigation links
āāā components/
ā āāā ButtonLink.tsx # Reusable button component
ā āāā ProductCard.tsx # Card component for product display
ā āāā ProductDetails.tsx # Component for displaying product details
ā āāā ProductList.tsx # Component for rendering a list of products
Clone the repository:
git clone https://github.com/masniper/nextjs-rendering-examples.git
cd nextjs-rendering-examples
Install dependencies:
npm install
Run the development server:
npm run dev
Open http://localhost:3000 in your browser.
Navigate between SSR, SSG, ISR, and CSR pages.
Display lists and details for each rendering method.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Feel free to open an issue or submit a pull request.