TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How we switched our template rendering engine to React

122 点作者 eldude超过 8 年前

6 条评论

xmatos超过 8 年前
Best web app I&#x27;ve developed was basically Django, with bare minimum JavaScript to handle some in-page effects. People been trying to shoehorn desktop concepts in the web since forever and it will never work. A desktop app is installable, a web site is not. It makes no sense to wait your js app to download for the sake of smooth page transitions.<p>Take a look at reddit&#x27;s new mobile site, written in react. It takes around 7 seconds to load, to display text and links. Compare that to HN&#x27;s, which loads in 0.1 sec, for basically the same content.<p>SPA&#x27;s have their place, for things like games or the likes of google maps. But for the rest, please respect the web paradigm . Your site will be simpler to build, faster and most importantly, lighter. The web world has become mobile-first, not js-centric...
评论 #12993749 未加载
评论 #12993640 未加载
评论 #12993600 未加载
评论 #12993672 未加载
评论 #12993520 未加载
评论 #12993482 未加载
评论 #12993750 未加载
krob超过 8 年前
SPA is mostly useful for reducing the cost of large application deployments. It improves speed for loading the initial bootstraping of the application. That means index is delivered almost instantly, and depending on the async loading of the code, can be dramatically speed up. SPA will reduce the overall server-rending of content besides json results which will be compressed, and json is smaller than html markup. Also SPA provides for a more sophisticated user experience. But like all things, the original cars got people from a-z, but not in style or comfort. As technologies improve over time, so will the reasons for using SPA. Browsers eventually will allow offline browsing as a standard feature, and having the SPA JS installed &amp; json written to localstore&#x2F;indexedDB will make using that UI rather nice, instead of always getting a 404 response when you have no internet and such. SPA is about control, server-rendered requires connectivity and difficulty handling response when failure occurs. 1st Major SPA&#x27;s were email clients, consider google&#x27;s gmail or microsoft web outlook service for exchange servers. Huge benefit with SPA, because the UI is complex and should not be constantly refreshing, because it can cause contextual change on what is displayed and present in-app state from re-initialization.
christophilus超过 8 年前
This is totally anecdotal, but my wife and my mom both commented to me recently on how Pinterest&#x27;s latest UI changes have really slowed the site down in their experience. I wonder if React is partially at fault there?
bwd1992超过 8 年前
Would have liked to have seen some figures or graphs visualising the React performance boost.<p>Also I thought one of the advantages of using a js framework is that rendering can be done on the client? It sounds from this article that server rendering is more advantageous?<p>Also SEO was mentioned, but I thought javascript was taken into consideration by web crawlers?
评论 #12992473 未加载
评论 #12992526 未加载
评论 #12992225 未加载
评论 #12992033 未加载
评论 #12992135 未加载
评论 #12993509 未加载
评论 #12992680 未加载
nsomaru超过 8 年前
I saw a presentation about REST and it included the concept of &#x27;on demand code&#x27;; why do we need to serve up all our react components in a js blob? Can&#x27;t we serve up minified and compressed components preemptively on the wire to keep load times small? Would this offer a benefit or am I missing something?
abritinthebay超过 8 年前
Congrats to the team!
评论 #12992469 未加载