Getting ready

First, let's create a new directory called nextjs, initialize package.json, and finally create a new directory inside it:

  mkdir nextjs  cd nextjs  npm init -y  mkdir src

Then we need to install some dependencies:

  npm install next react react-dom axios node-sass @zeit/next-sass

Get React Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.