E
E
EastJesus2021-09-17 14:24:12
JavaScript
EastJesus, 2021-09-17 14:24:12

When should you use Next.js?

I have already read the Next.js docs many times, I see its great popularity, but I still can’t understand why to use it. As the main plus, I see that it can be used to configure SSR out of the box and reduce the initial load time of the application. The rest of the pluses - routing, etc., are solved by standard libraries from the React ecosystem.

Do I understand correctly that if I usually have a SPA application and I don’t care about SEO and the speed of the initial page load, then I don’t need Next.js and its analogues?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Natebash, 2021-09-17
@EastJesus

This question should be answered like this: are you tired of building your react project from scratch every time.
What gives out of the box Next - (questions are asked during the initial project analytics)
Typescript - if typing is needed?
React router - routing?
Css modules - style scope?
Express - for SSR?
Helmet - SEO?
Sharp **-** Need webp generation?
If everything above is a forest, then you can safely throw routing, typing, and so on into cra.
One of the big pluses of Next, in the dock as a framework, is already dictating the architecture of the React application, and there is an agreement on what and where (we had this among the teams).
If we are talking about "naked" react - each project is like a new one, when you come to a project in support of an existing one, your eyes flow out every time from the "new architecture". That is why I love Angular passionately, there is no constant oppression of new approaches to software development.

I
Ivan Ivanovich, 2021-09-17
@IwanQ

Should be used in cases where SEO is needed. I don’t see any other particularly significant reasons to complicate development for myself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question