Confusion with node server-side rendering - Stack Overflow
为情所困
为情所困 2017-05-16 13:36:28
0
2
535

Does the node server-side rendering of the front-end framework mean that the framework is initialized on the server side and the data is rendered directly to the browser for display? If that's the case, I'm thinking, if the front-end framework is initialized on the back-end, then don't the method variables and memory initialized by the framework stay in the server node environment? I'm very confused!

为情所困
为情所困

reply all(2)
仅有的幸福

The backend only renders the template and returns the initial html file, which makes access faster, but adding methods and other things is still done by the frontend, by referencing script tags, etc.

黄舟

Basically run it twice and control it with the life cycle function of redux来说,redux是支持传入初始状态,在后端将store生成,然后作为一个属性挂载到window上面,这个基本上会利用模板,例如ejs。对于react的技术栈来说,可以关注一下我写的一个脚手架,支持服务端渲染,里面有服务端渲染的实现。服务端渲染有可能造成的是前端跑一次后端跑一次,进行两次数据获取过程,需要利用react.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template