Posts

Next.js start with Helloworld.

Image
Lets create our very first next.js application. And let's begin by setting up our development environment. For next.js we need two things installed. Node and text editor of your choice. To create new project we need one line of code in the terminal.  npx create-next-app hello-world Select hello-world folder and in terminal run command as yarn dev or npm run dev -->This command will setup a development environment server on local port 3000. Now we can see hello-world application is up and running by default the ui features a heading that sys welcome to Next.js and few links to the documentation, We can also see the instruction started by editing pages/index.js. lets go VS code and open index.js file under pages and edit the code. After edited the code for displaying the Hello world!!! text. Now we Understand how to generate a next app using next app command.

Next.js Introduction.

 What is Next.js? The docs defines next.js as the react framework for production and this line which I want to break down further to help you understand what exactly is next.js The React Framework for production React:  If you think about building applications with just react you know that it's not quite possible to build full feature-rich application ready to be deployed to production. React is a library for building user interfaces, it is responsible for only the view layer of an application and you as the developer have to make decisions on other features of the app for example how would implement routing, styling, authentication etc.. Next js Next js on other hand its a react framework so it is a package that uses react for building user interfaces but it also comes loaded with a lot more featured that enable you to build full-fledged production ready applications feature exactly like routing, styling, authentication, bundle optimization etc.. There's no need to install add