正在加载视频...

视频加载失败

is a great Next.js app router app. It's blazing fast, even with data being highly dynamic (it shows realtime stock market data & politicians' trades) Some cool details from my analysis 🧵

91,310 次观看 • 1 年前 •via X (Twitter)

11 条评论

Guillermo Rauch 的头像
Guillermo Rauch1 年前

The initial state for the 'app' parts of the site is a Loading state, like a SPA. Unlike a SPA, but like a traditional website, in the same first load (roundtrip) we also get the data. You can see this by turning off JS which disables the <script> tags Next.js streams with:

Guillermo Rauch 的头像
Guillermo Rauch1 年前

In the same app they also pre-render statically as HTML. This allows them to have SPA-like dynamic behavior, combined with more traditional content pages, without having to ship 2 websites and 2 frameworks. This is what news look like without streaming or any client `fetch`:

Guillermo Rauch 的头像
Guillermo Rauch1 年前

One can do even better than "Loading…" text. With Partial Prerendering, even more static data can be hoisted into the initial CDN flush. Also, it might be worth looking into skeletons vs loading text, but that's a product design observation.

Amberdata 的头像
Amberdata1 年前

Stay ahead in crypto trading with fast access to pricing, order books, and trade data from trusted exchanges and marketplaces. No waiting, no demos—just seamless access to the insights you need to succeed.

D. Alan Gilbert 的头像
D. Alan Gilbert1 年前

@nextjs what is granny doing buying stocks 😂

Guillermo Rauch 的头像
Guillermo Rauch1 年前

@nextjs lol nice volume for grandma

Grimz 的头像
Grimz1 年前

@nextjs That is impressively fast!

Guillermo Rauch 的头像
Guillermo Rauch1 年前

@nextjs True. I came across it on HN and I thought: holy crap. Lo and behold it's @nextjs AR on @vercel. My goal is to keep working backwards from great products into the tech.

Saurabh Suri⚡🥷🏼 的头像
Saurabh Suri⚡🥷🏼1 年前

@nextjs I’m going to load this thread into my cursor rules. It better work.

Dathan 的头像
Dathan1 年前

@nextjs Daamn, how is it this fast with all those images and graphs

quick007 的头像
quick0071 年前

@nextjs Honestly, textbook example of a website that feels slow... Most of the cached stuff feels fine, and loading states (when they show up) are great. But in a decent number of cases, user interaction feels sluggish. 🧵1/?

相关视频