SAP Spartacus 服务器端渲染编程规范
生活随笔
收集整理的這篇文章主要介紹了
SAP Spartacus 服务器端渲染编程规范
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
鏈接:https://sap.github.io/spartacus-docs/server-side-rendering-coding-guidelines
禁止使用只有在瀏覽器環境下才可用的全局對象,比如window, document, navigator等等,因為在服務器端渲染模式下,這些對象不可用。
Do not access global objects that are available in the browser. For example, do not use the window, document, navigator, and other browser types, because they do not exist on the server.
看一個Github issue:
https://github.com/SAP/spartacus/issues/10201
需要使用注入進來的document對象:
更多Jerry的原創文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的SAP Spartacus 服务器端渲染编程规范的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 热敏打印机排版—了解打印机的基础知识
- 下一篇: SAP Spartacus和Table相