Skip to content
BENIBIX Learn

Next.js

Development🌐 Web DevelopmentFrameworks

Also known as NextJS, Next

A framework built on React. It adds routing, server pages and static pages.

Think of it like

Think of it like a house kit built around React bricks. The walls, doors and pipes come ready.

Example

Next.js is made by the company Vercel and was first released in 2016. Jack builds his shop with it, and each product page is pre-built for speed.

Why it matters

It turns React into a full site toolkit. Pages are fast and easy for search engines to read.

Definition

Next.js is a framework built on top of React. It is for making full websites and web apps. It adds what React leaves out: routing from the folder layout, server-side rendering, static pages and server code. Each page can be built on the server, ahead of time, or in the browser. It handles bundling and image sizing too. Many teams start new React projects with it.

Example code

console
$ npx create-next-app@latest my-shop
This starts a new Next.js project in a folder called my-shop.

Common mistake

Running code that needs a browser on the server, like reading window. The server render then crashes.

Key takeaways

  1. 1
    React plus the rest. Routing, rendering, server code.
  2. 2
    Pick per page. Server, static or browser.
  3. 3
    Folders are routes. The file layout is the map.