简体   繁体   English

我在客户端使用 next.js 工作,在服务器端使用 node.js 表达

[英]Who do I work with next.js for client side and express in node.js for server side

I have now learned to work with nodejs.我现在已经学会了使用 nodejs。 but now I wanted to learn more about making better websites.但现在我想了解更多关于制作更好网站的知识。 So I found next.js, That I have learned the basic of.于是我找到了next.js,这就是我学到的基础。 But I don't understand how I work with them to together.但我不明白我是如何与他们一起工作的。

So my question is, How to I have a node.js server-side and next.js on the client-side?所以我的问题是,如何在客户端拥有 node.js 服务器端和 next.js?

If you have any other thing to learn or tell me, please tell me all I need to know.如果您有任何其他事情要学习或告诉我,请告诉我我需要知道的一切。

probably you misunderstood what next.js is.可能你误解了 next.js 是什么。

NodeJS is used to create backend apps that handled HTTP request, more information about backend NodeJS 用于创建处理 HTTP 请求的后端应用程序,有关后端的更多信息

React is a JS library to create Frontend Application which is served by a server. React是一个 JS 库,用于创建由服务器提供服务的前端应用程序 But a React App is a really heavy js file and is really slow to be served, then in order to improve the performances you have to pre-render the html in the server and then send the pre-rendered web page to the client.但是 React App 是一个非常重的 js 文件,并且服务起来非常慢,那么为了提高性能,您必须在服务器中预渲染 html,然后将预渲染的网页发送到客户端。 More about SSR vs CSR关于SSR 与 CSR 的更多信息

Next.JS is a framework to develop SSR React App. Next.JS 是一个开发 SSR React App 的框架。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM