简体   繁体   English

使用 reactjs 的服务器端渲染

[英]Server side rendering using reactjs

I have started to work on react server side rendering, Having some questions ie how about routing and can i implement server side rendering for all pages in application,Please provide any example on server side rendering in reactjs,Thanks我已经开始研究反应服务器端渲染,有一些问题,即如何路由以及我可以为应用程序中的所有页面实现服务器端渲染,请在 reactjs 中提供有关服务器端渲染的任何示例,谢谢

for plain implementation in server side rendering you need to have different app entry point with StaticRouter instead of BrowserRouter react-routed-dom documentation with implementation: https://reacttraining.com/react-router/web/guides/server-rendering/putting-it-all-together对于服务器端渲染中的简单实现,您需要使用 StaticRouter 而不是 BrowserRouter 具有不同的应用程序入口点 react-routed-dom 文档的实现: https://reacttraining.com/react-router/web/guides/server-rendering/putting -一切都在一起

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

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