To start with Next.js you need to have node.js installed in your machine and that’s all. Next.js is like any other node.js application — you need npm or Yarn to install dependencies.First we have to create Next.js App and let's give it name as next-vital.
You can easily write a single command and Next.js project will be created.
npx create-next-app next-vital
After the installation is complete, follow the instructions to start the development server. Try editing pages/index.js and see the result on your browser.
To start developing your application run npm run dev
or yarn dev
. This starts the development server on http://localhost:3000
.
Visit http://localhost:3000
to view your application.
Use of next/link
As we are using React Router in the react app for moving to one page to another page. Next.js have inbuilt component for routing as next/link.
Thank you for reading blog!!