DEV Community

Fatima Alam
Fatima Alam

Posted on

NextJs Pre-Rendering

Pre-Rendering

NextJS pre-renders HTML before JavaScript is loaded in the page so as to give it a view at least.
React on the other hand loads only when JavaScript is loaded.

Pros->

  1. If there is an async call on a page load it will take time and it might show a loader or a single root element but in case of NextJS it will at least show you how the page looks like until JavaScript is loaded.
  2. If there is SEO then, Pre-Rendering performs better in that aspect -> basically for blogs nor e-comm websites.
  3. There is a wait time for the user.

Top comments (0)