What is Next JS ? How does Next JS work ?

Lutfi Maulana
2 min readMar 22, 2022

--

Next.js is a popular JavaScript-based framework for creating websites. And as a way to simplify the development process, Next.js can be an option.

Why? Because Next JS has several excellent features that make it no less than other frameworks. Starting from the various optimizations offered to good CSS support.

What is Next JS ?

Next.js is a framework built for React.js. This framework managed to fix the shortcomings of React.js, especially in terms of rendering.

How does Next JS work ?

The way Next.js works is to render the website on the server so that when the browser requests a page, the server immediately responds by displaying an HTML formatted page.

Next.js server has prepared a bundle package containing HTML, Javascript and React. So, browsers don’t need to manipulate the DOM of React and JavaScript packages to display HTML.
website content can be displayed instantly and users do not need to wait for the rendering process.

There are 2 types of rendering in Next JS, namely server-side rendering and static-side generator.

Server Side Rendering (SSR)

The way server side rendering works is that the server converts the React and JavaScript packages into HTML every time the browser calls the page.

Static Site Generator (SSG)

The way the static site generator works is that the server generates HTML pages at the build stage, which is the stage of converting the program code into a complete website, so the server does not generate HTML when the browser calls the page.

so many articles this time, hopefully useful. If you still have questions, please ask anything via the comments column. See you again!

--

--

Lutfi Maulana

I am enthusiastic JavaScript developer that enjoy writing JavaScript code, you can contact me on linkedin https://www.linkedin.com/in/lutfimaulana/