Reading Notes Class 40
- Teach us two things about Next.js.
- Next.js is a React framework that gives you building blocks to create web applications. Next.js handles the tooling and configuration needed for React, and provides additional structure, features, and optimizations for your application.
- The web apps built using NextJS are very fast. The web apps built using ReactJS are slow as compared to NextJS. Next doesn’t require offline support. ReactJS requires offline support. The difference between React and Next.js is React uses CSR or Client Side Rendering, where the UI elements are generated on the browser. In Next.js, the UI comes from the server, which gets generated in advance. If you wish to develop apps like e-commerce, marketing websites, or simple landing pages, you can use Next.js.
- Teach us two things about Gatsby.js.
- Gatsby.js allows sites to defer non-critical page generation to increase load times. This allows developers to generate only the most important pages during a build. Less trafficked pages are then rendered only when accessed by site users. This is especially useful for large and complex sites.
- Gatsby.js differs from Next.js in; Gatsby has the advantage, however, due to its use of static rendering. Pages are pre-rendered at build time, resulting in significant performance improvements. Next. js, on the other hand, uses a more traditional server-side rendering approach, which can be slower but offers greater flexibility. Rather than running code on a server that tells a user’s browser what to generate, Gatsby builds the site in preparation for the user arriving, which is called pre-rendering static assets. Since there’s no time wasted waiting on server responses, page load times can be incredibly fast.