I'm trying to figure out the difference between NextJs and Create React App. I know both are there to make our life easier while developing our Front-end Apps using ReactJs.
After exploring some articles on Google, I found that the main difference is
NextJs provides server side rendering (SSR) while Create React App provides client side rendering (CSR) and SSR improves performance of Application Loading.
But what about other parameters from development perspective like
Maintainability and Scalability of the Web App developed with NextJS or CRA?
Typescript and React Hooks/Redux support?
Or you can even Guide me if I'm doing a wrong comparison?
5 Answers
I've used both NextJs and CRA. Both these frameworks can be used to get started quickly and provide a good developer experience. However, both of these have use cases where either of them shines better. I'll try to compare them based on some of these factors. Feel free to suggest edits with additional points or comments
Server Side Rendering
| CRA | Next.js |
|---|---|
| CRA doesn't support SSR out of the box. However, you can still configure it. It just takes more effort to setup SSR with your preferred server and configuration. The development team doesn't have plans to support this in the near future. They suggest other tools for this use case. |
NextJs has different types for SSR. It supports SSR out of the box. * Static generation: fetch data at build time. This works best for use cases like blogs or static websites * Server side rendering: fetch data and render for each requests. You have to do this when you need to serve different view for different users. |