NextJS — Convert Client-Side React app to Server-side Rendering in 5 mins
NextJS may be the new Sensation in the UI world. It is a bunch of Web tools that let us start building an application in a very short span of time. It comes with a lot of advantages. People aware of NextJS may dive directly into the Migration part.
What is NextJS?
NextJS is a Javascript library that uses and elevates the usage of very famous tools and frameworks in the frontend universe. Likely to name a few — Webpack, React, Babel, etc.
What do we gain through NextJS?
- Server-rendered by default
- Automatic code splitting for faster page loads
- Simple client-side routing (page based)
- Webpack-based dev environment which supports Hot Module Replacement(HMR)
- Able to implement with Express or any other Node.js HTTP server
- Customizable with your own Babel and Webpack configurations
In this article, we will see how to migrate a React App (Client Side Routing) to SSR (Server side rendering) App using NextJS. NextJS also supports various things as below, about which I will be writing a detailed article very soon.
- _app.js — A entry point to handle universal page…