I'm new to React library, I know the core functionality of React and I built simple web applications with it, and of curse, I'm taking advantage of the amazing create-react-app
mand using npx
. The web applications that I built earlier were CSR ( Client Side Render ) applications which are not CEO friendly, if you want to implement SSR in your web app using create-react-app
you should make an effort to do it by reading some articles and know a little bit about Nodejs and Express and so on ...
a few days ago I encountered something wonderful called Next.js a React framework that is built on top of the React library which has SSR technology built-in and has its own folder structure and other advantages of a great framework.
so here are my questions, is there any case in a real project that we don't want our application to be SSR except the user dashboard or admin panel? and when do we need to use Next.js over the React itself?
I know in some cases it's better to not reinvent the wheel, so I would be really appreciated if you could share your knowledge and experiences in this particular case with us.
Thanks a lot.
I'm new to React library, I know the core functionality of React and I built simple web applications with it, and of curse, I'm taking advantage of the amazing create-react-app
mand using npx
. The web applications that I built earlier were CSR ( Client Side Render ) applications which are not CEO friendly, if you want to implement SSR in your web app using create-react-app
you should make an effort to do it by reading some articles and know a little bit about Nodejs and Express and so on ...
a few days ago I encountered something wonderful called Next.js a React framework that is built on top of the React library which has SSR technology built-in and has its own folder structure and other advantages of a great framework.
so here are my questions, is there any case in a real project that we don't want our application to be SSR except the user dashboard or admin panel? and when do we need to use Next.js over the React itself?
I know in some cases it's better to not reinvent the wheel, so I would be really appreciated if you could share your knowledge and experiences in this particular case with us.
Thanks a lot.
Share Improve this question edited Apr 24, 2021 at 8:55 Parsa Mir Hassannia asked Dec 3, 2020 at 20:08 Parsa Mir HassanniaParsa Mir Hassannia 3612 gold badges6 silver badges17 bronze badges1 Answer
Reset to default 4is there any case in a real project that we don't want our application to be SSR?
For example when you are building a kind of user's panel where public access is not alowed and SEO is not important. Another case is hosting Next.js app - you need Node.js environment on you server, while CRA buils simple static files. At early stage of projects it's easy to deploy and maintenance.
Next.js is great when you need SEO or a kind of simple API for backend tasks (database connections, forms etc...). On advanced projects I think it's better to move your backend logic into seperated API.
From the other hand Next.js requires other approach of thinking, sometimes ponents are rendered on server side, sometimes in client's browser, which may be not clear for beginers.
I think it's better to strat with CRA and then, when you'll see a real need then add Next.js into your CRA project.