Why people use Next.js a lot

Posted by : on

Category : next


Reference


Why people use Next.js a lot


Client-side rendering creates HTML in real time in the browser, and

server-side rendering creates HTML on the server in advance and sends it to you.


https://codingapple.com/wp-content/uploads/2023/01/nextjs8.png

Using client-side rendering can create a beautiful and smooth site, but it also has the disadvantages of

but there are disadvantages such as slow loading speed of the first page and difficulty in search exposure.

The bounce rate of the website is lowered, and it costs a lot of money to advertise to get traffic.

So, the return on investment metric will be low.


https://codingapple.com/wp-content/uploads/2023/01/nextjs2.png

When using server-side rendering

The above disadvantages often disappear because the HTML is pre-created on the server.

This is why there are so many places that use client-side rendering and then switch back to server-side rendering.


However, if you choose to use server-side rendering

useState useEffect react-query redux ajax react-router props, etc.

You don’t need much of what we used to call frontend specialization.


This version (v12) of Next.js is packed with fun, useful features + better performance.

  • Folder-based autorouting
  • Redesigned server API functionality
  • Easy DB connections
  • Intuitive rendering strategy selection
  • Server-side rendering without JavaScript delivery
  • Powerful caching
  • Image and font optimizations

and more.

Membership authentication is also easy to implement with libraries like Next-auth.


There are actually a lot of what we call “rendering frameworks,” including nuxt, sveltekit, and remix.

There are a lot of options, but the newer rendering frameworks like Next.js

They all have a similar syntax, so it’s easy to learn one and then the others.


Of course, there are downsides.

  • The React library’s newspaper client component and server component are introduced to code.

It’s very annoying to write code separately.

  • I don’t use it much, but if you need to use features like WebSocket and WebRTC, it’s better to make another Nodejs + express server by yourself - And because it’s unfinished and released version 13, there are still many unstable updates. Every time I update, something breaks.



About George
George

I'm George, a Web Developer.

Email : kghee9612@gmail.com

Website : https://ge5rg2.github.io

About George

Hi, my name is George. This is where I record what I have studied :D

Star
Useful Links