服务器渲染(SSR)单个水疗中心
我在单个SPA应用程序中的布局(routes.html)下面有
<single-spa-router>
<redirect from="/" to="/home"></redirect>
<div id="wrapper">
<div class="wrapper-content">
<div class="layout-content">
<application name="@ppbet/layout-app"></application>
</div>
<div class="main-content">
<div class="layout-left-content">
<application name="@ppbet/layout-left"></application>
</div>
<div class="center-content">
<route path="home" exact>
<application name="@ppbet/home-app"></application>
</route>
<div class="main-content-custom">
<footer>
<!-- I want this Application to be rendered on Server side -->
<application name="@ppbet/footer"></application>
</footer>
</div>
</div>
<div class="layout-right-content">
<application name="@ppbet/layout-right"></application>
</div>
</div>
</div>
</div>
</single-spa-router>
我希望在应用程序加载时呈现服务器的页面应用程序(React组件)。
我已经阅读了 ssr in Single Spa 看起来像这样呈现整个应用程序在服务器端和客户端的其余应用程序。我什至尝试使用 single-spa-html 但是我看到这不会在服务器端渲染我的HTML。任何帮助将不胜感激。
I have below Layout (routes.html) in my Single SPA Application
<single-spa-router>
<redirect from="/" to="/home"></redirect>
<div id="wrapper">
<div class="wrapper-content">
<div class="layout-content">
<application name="@ppbet/layout-app"></application>
</div>
<div class="main-content">
<div class="layout-left-content">
<application name="@ppbet/layout-left"></application>
</div>
<div class="center-content">
<route path="home" exact>
<application name="@ppbet/home-app"></application>
</route>
<div class="main-content-custom">
<footer>
<!-- I want this Application to be rendered on Server side -->
<application name="@ppbet/footer"></application>
</footer>
</div>
</div>
<div class="layout-right-content">
<application name="@ppbet/layout-right"></application>
</div>
</div>
</div>
</div>
</single-spa-router>
I want the footer Application(A React Component) to be Server Render at the time of load of application.
I have read through SSR in Single SPA Looks like this to render a whole application on server side and rest of applications on client side. I even tried to use single-spa-html, But i see this will not render my HTML on Server side. Any help will be Appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论