Nextjs React

Posted on  by admin

Modified1 year ago. 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 command 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.

See also[edit]

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.

Basic usage[edit]

Parsa Mir Hassannia. Parsa Mir HassanniaParsa Mir Hassannia.

is there any case in a real project that we don't want our application to be SSR?

Common idioms[edit]

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..).

Installing the plugin

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 components 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.