Static Rendering with Next.js
📖 Scenario: You are building a simple Next.js website to show a list of favorite fruits. The list is fixed and does not change often.This means you can use static rendering to generate the page once when building the site, so it loads very fast for visitors.
🎯 Goal: Create a Next.js page that statically renders a list of fruits using the default static rendering method.The page should show a heading and an unordered list of fruit names.
📋 What You'll Learn
Create a constant array called
fruits with the exact values: 'Apple', 'Banana', 'Cherry'Create a React functional component called
FruitList that returns JSXUse the
fruits array inside the component to render an unordered list (<ul>) with each fruit as a list item (<li>)Export the
FruitList component as the default export of the page💡 Why This Matters
🌍 Real World
Static rendering is used for pages that do not change often, like blogs, marketing pages, or product lists, to make them load very fast for users.
💼 Career
Understanding static rendering in Next.js is essential for frontend developers building fast, SEO-friendly websites.
Progress0 / 4 steps