File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 27
27
28
28
- 服务端渲染不需要先下载一堆 js 和 css 后才能看到页面(首屏性能)
29
29
- SEO
30
- - 服务端渲染不用关心浏览器兼容性问题(随意浏览器发展 ,这个优点逐渐消失)
30
+ - 服务端渲染不用关心浏览器兼容性问题(随着浏览器发展 ,这个优点逐渐消失)
31
31
- 对于电量不给力的手机或平板,减少在客户端的电量消耗很重要
32
32
33
33
以上服务端优势其实只有首屏性能和 SEO 两点比较突出。但现在这两点也慢慢变得微不足道了。React 这类支持同构的框架已经能解决这个问题,尤其是 Next.js 让同构开发变得非常容易。还有静态站点的渲染,但这类应用本身复杂度低,很多前端框架已经能完全囊括。
@@ -142,4 +142,4 @@ Next.js 是时下非常流行的基于 React 的同构开发框架。作者之
142
142
143
143
> 讨论地址是:[ 前后端渲染之争 · Issue #5 · dt-fe/weekly] ( http://link.zhihu.com/?target=https%3A//github.com/dt-fe/weekly/issues/5 )
144
144
145
- > 如果你想参与讨论,请[ 点击这里] ( https://github.com/dt-fe/weekly ) ,每周都有新的主题,每周五发布。
145
+ > 如果你想参与讨论,请[ 点击这里] ( https://github.com/dt-fe/weekly ) ,每周都有新的主题,每周五发布。
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class Ball {
56
56
// 构造函数申明为 private,就可以阻止 new Ball() 行为
57
57
private constructor () {}
58
58
59
- public static instance = () => {
59
+ public static getInstance = () => {
60
60
if (this ._instance === undefined ) {
61
61
this ._instance = new Ball ()
62
62
}
You can’t perform that action at this time.
0 commit comments