3,589 karma · joined December 8, 2009
We still strongly recommend everyone to upgrade their Next, React, and other React meta-frameworks (peer)dependencies immediately.
If I went back in time, I would have called it Routing Middleware or Routing Handler. A specific hook to intercept during the routing phase, which can be delivered to the CDN edge for specialized providers. It’s also a somewhat advanced escape hatch.
Since OP mentions logging, it’s worth noting that for instrumentation and observability we’ve embraced OpenTelemetry and have an instrumentation.ts convention[2]
[1] https://nextjs.org/blog/next-15-5#nodejs-middleware-stable
[2] https://nextjs.org/docs/app/api-reference/file-conventions/i...
It’s nice insofar with very little abstraction, runtime, and bundle size overhead, you can easily switch between models without having to learn a new API.
Last I checked, a Tweet embed alone was several mbs of JS, and it causes a bunch of layout shift and loads third party resources. On my blog they're pre-rerendered and shipped statically[1]
Probably the strongest reason though is to not set a 'power cap' on your project unnecessarily. It'd suck to have to rewrite a project because you got trapped in a local maxima, which is why i always share you can have your 100 lighthouse cake & eat it too.
[1] https://rauchg.com/2021/making-the-web-faster#next-momentum
- https://next-ai-news.vercel.app/
- https://emoji-todo.vercel.app/
Next.js scales up and down in complexity / ambition. On perf:
[1] https://nextjs.org/docs/app/building-your-application/deploy...
https://github.com/rauchg/next-ai-news
(This is with Next.js 14 App Router and Server Actions)
Can you tell me more about the pains you're seeing?
Three quick reactions:
- The employee did not find location information on our platform. Our security team is certain of this and that the system worked as intended, but the employee misused it.
- Everyone at the company takes PII and protecting customer data extremely seriously. We have and we will continue to reinforce this in light of this situation.
- Our ToS are specifically designed to protect our customers. Note that in the terms folks are discussing we mention “only in connection to providing our services”. That said I’ll be following up internally to see if more clarifications can be made (I’ve seen companies provide high level summaries in the past to help with the legalese interpretation)
Some clarifications:
- Leap AI (tryleap.ai) created a template which is a demo, incomplete version of other popular products.
- Templates get submitted to the marketplace all the time. One of Vercel’s devrel promoted it. The idea is to help people learn from a realistic, complete example
- This template has nothing to do with the code or data of any existing hosted Vercel app
Happy to clarify anything else further
No one is trying to kill Tamagui. Why would we want that?
> the higher ups there are investors in Tailwind
I don’t know any investors in Tailwind at Vercel. I’m certainly not one. I don’t think they’ve even taken outside investment. And it’d be against our ethical and fiduciary responsibilities to favor one solution over another on that basis.
> are trying to consolidate styling around it for their own ecosystem benefit
Tailwind is a great solution that’s earned the hearts and minds of the community, and that’s why we include it as an option in `create-next-app`.
It’s an option because you can bring your own styling solutions to Next if you’d like (like yours: https://tamagui.dev/docs/guides/next-js)
Maybe your perception is backwards? Large parts of the ecosystem are consolidating on Tailwind, and it’s our job to provide sensible defaults according to that.
Scores need to be adjusted by and looked at through the lens of complexity. Next.js powers some of the most sophisticated web applications in the world, not just your blog and mine.
e.g.: the instant you bring "necessary evils" like display ads, your scores WILL suffer.
> Using a global CDN can help get your assets to your users quicker, and most companies by this point are using something like Cloudflare or Vercel, but many still only serve static or cached content this way. Very frequently the origin server will still be a centralized monolith deployed in only one location, or there will only be a single database cluster.
Notably: even if the source of truth is single-region, there's a lot that can be done to improve the experience by flushing parts of the page at the edge.
Check out https://how-is-this-not-illegal.vercel.app/ where the layout.tsx[1] file is edge-rendered right away with placeholders, and then the edge renderer streams the content when the single-region database responds.
Furthermore, consider that parts of the page (like the CMS content) can also be cached and pushed to the edge more easily than, say, a shipping estimate or personalized product recommendations, so you can have content as part of that initial placeholder flush. We have an e-commerce example that shows this[2].
[1] https://github.com/rauchg/how-is-this-not-illegal/blob/main/...
[1] https://rauchg.com/2014/7-principles-of-rich-web-application...
As projects scale this matters more. For example, hard page transitions will accrue the cost of re-initializing the entire application’s scripts for every click.
More detail here of how this scales to any content model complexity:
There also really wasn't a UI opportunity in this case (although one thing we thought about was a setting to control it and turn off the Vercel override).
I've seen a lot of customers get burn by sending `max-age` as a way of getting their CDN to cache, not realizing they're inadvertently caching on users' machines. Sometimes it's a seemingly harmless "5 minutes", but that can be damaging enough for rapidly changing pages (imagine breaking news on a homepage).