Topics


Pages


Content

Byline:

The React Framework for Production

Key links

Uncategorized Links

Documentation

Tutorials

Blog posts

Static vs server-side rendering

As with React, you can build more advanced web apps but in this case this template uses a simple site which can be hosted as static site such as on GitHub Pages (with GitHub Actions for CI) or with Netlify (CI and hosting) You can look into use Vercel as a hosting service if you want server-side rendering.

From the homepage:

Next.js gives you the best developer experience with all the features you need for production: hybrid static & server rendering, TypeScript support, smart bundling, route pre-fetching, and more. No config needed.

Announcements and events

Next.js 11 blog post.

See Next.js conf page. There is an annual conference plus smaller conferences in between.

Install

$ npx i next@latest

Lint

Install dev dependencies:

$ npm install -D eslint eslint-plugin-next

Generate a config, so that ESLint understands JSX syntax. You’ll get an error if you don’t do this.

$ npx eslint --init

Now lint with:

$ npx next lint

Help on the command:

Run ESLint on every file in specified directories.

If not configured, ESLint will be set up for the first time.

Create a fresh project from scratch

From Create a Next.js App tutorial on the homepage.

$ npx create-next-app nextjs-blog --use-npm \
    --example "https://github.com/vercel/next-learn-starter/tree/master/learn-starter"
$ cd nextjs-blog

That uses the learn-starter template.

See all the examples on GitHub - vercel/next-learn-starter.

Quickstart