admin管理员组文章数量:1435859
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.
本文标签: javascriptwhen to use Nextjs over the React itselfStack Overflow
版权声明:本文标题:javascript - when to use Nextjs over the React itself? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745384347a2656308.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论