With Next.js’ app directory and that new idea, it takes less than 150 lines of code to create this. ~4 lines are actually related to animation (wrapping the tree with <Satori>):
Statically typed links are coming to
@nextjs
:
◆ Autocompletion
◆ Error on invalid routes
◆ Prevents 404 links during build
◆ Dynamic, catch-all, and optional catch-all routes
◆ Works with both `pages` and `app`
◆ No extra configuration needed!
With Next.js’ app directory and that new idea, it takes less than 150 lines of code to create this. ~4 lines are actually related to animation (wrapping the tree with <Satori>):
CSS-only scroll area indicator using `scroll-timeline`.
The trick is to simply add an opacity animation, controlled by that timeline, to these 2 arrow elements.
Some tech details and stories behind
@vercel
’s OG image generation and Satori lib...
There’s been a demand to generate dynamic and fancy OG images for a long time. And we have some solutions but they all seem to be a little “limited”.
GitHub Copilot is definitely more than just an autocompletion tool, it tries to understand the code you're writing. Have been using it for weeks and it's truly amazing.
I’m redesigning my website on top of some exciting new things: Next.js App Router, Turbopack, CSS View Transitions, Tailwind CSS 4.0, MDX in RSC.
Will have it open sourced when it’s ready :)
Interestingly Turbopack, Tailwind and MDX compilers are all backed by Rust now.
My React Server Components (RSC) mental model is basically:
They’re getServerSideProps / getStaticProps but more powerful.
Things RSC / gSSP / gSP share in common:
🔸 You can’t pass things like normal functions from RSC / gSSP / gSP to the client, because they just can’t be…
I like this idea a lot and after many years, finally brought it to life... CSS-only magnifier! The demo doesn’t have any JavaScript.
Will share the code next week, but I believe some of you can already figure it out :D
I spent a month in NYC & SF preparing for the launch of with the team — it went smoothly. On the night of release, while flying back to Europe, I was treated to a stunning aurora over the Greenland skies. Breathtaking.
The new React Wrap Balancer 1.0 version now uses the native CSS feature `text-wrap: balance` automatically when it’s available!
Read more about the release:
CSS `text-wrap: balance`:
UIs that are 1) context-aware 2) dynamically streamed from the server 3) interactive 4) stateful in both server and client 5) hooked into LLMs.
Will share more and open source it very soon.
We'll be open sourcing an LLM → UI streaming mechanism powered by the
@vercel
AI SDK and RSC.
It will help you build rich AI apps that go beyond text and markdown, with optimal performance and robustness to UI state changes.
After 11 beta releases and weeks of testing, we launched SWR v0.3.0! 🎊
v0.3.0 includes tons of bug fixes, enhancements and test cases, as well as a new dedicated pagination/infinite loading API. Check out the docs:
Guess I really love CSS and I’m obsessed with the idea of CSS-only challenges. There are some interesting tricks used and someday I’ll write about them...
Here are a few of them:
Some recent updates for
@vercel
’s OG image generation and Satori:
🔹 Flex gap is now supported 🎉
🔹 HTML lang= attr 🎉
🔹 currentColor 🎉
🔹 Improvements related to emojis, viewBox, data URI, break-word, white-space and more
Trying to visualize that Server-Side Rendering (SSR) isn't just about SEO, it actually makes the site faster. And why PPR is the goat.
Main cost =
🟥 JS load & Hydration
🟡⇆🔵 Region Latency
Going to convert markers of to attributes of a new vertex shader. This works similar to a particle system, and it is more performant than the for loop in our current fragment shader (so you can add more markers!).
Next is arcs and DOM nodes/events.
Did some research on metaballs today... got some interesting renderings w/ React and WebGL. Also tried for the first time, it's such an amazing tool...
Image generation with HTML and CSS (or Tailwind CSS) at the Edge (or Node.js/browser). 5x faster, 100x smaller, 160x cheaper than our old solution.
Try it:
Powered by Satori and Resvg.
Learn about the hidden cost with JavaScript runtimes.
By optimizing package imports, we’ve seen 40% faster cold boots when using libraries with many barrel files.
And I’ll try to draw some diagrams to show how I visualize Server Actions in my head and how they work, as I saw some confusion around. There’re two ways of using Server Actions:
1. Define Server Actions in Server Components and pass them to Client Components via props...
Weirdest bug this week: iOS Safari renders long digits (e.g. 1111111111) as a telephone link that breaks hydration.
To avoid, add `<meta name="format-detection" content="telephone=no">`. Maybe can be a common thing as any dynamic content may run into it.
Just noticed that most Touch Events APIs are now supported in iOS Safari, including `touchType` (👆/✍️), `force`, `altitudeAngle`, and `azimuthAngle`! This is so powerful that you can create a fully Web based drawing app w/ brushes!
Here's a simple demo: .
That’s it! You can find the code here:
(Note that the demo uses `
@property
`, but you can also make an extra div and use CSS `rotate` if that’s an issue)
Published v0.1.10 of SWR with a bunch of improvements:
◆ Query variables
◆ React Native
◆ 28% Smaller (3.4k gzipped)
◆ Improved TS support
◆ Improved performance
◆ Examples of subscription, prefetching and many more
◆ Smart error retries
When reviewing PRs especially in open source projects, remember to also take a look at npm/yarn/pnpm lockfile changes. They can be used to attack the project by introducing malicious dependencies. Like this:
Just in case you weren’t aware, enabling the `experimental.typedRoutes` feature in
@nextjs
automatically checks for invalid links, along with support for rewrites and redirects!
Have been working on implementing Server Actions in Next.js with the team for the past 5 months (and yes, it still feels magical), couldn’t be happier to see it come to life. Thanks
@sebmarkbage
@feedthejim
@acdlite
@kdy1dev
❤️
I didn’t expect this to get so much attention... thanks everyone! 🙇♂️
What I learned from it was “people overestimate what they can do in a year and underestimate what they can do in 10 years” by
@BillGates
. We are good at predicting things linearly but the world is exponential:
New blog post - "Blur Vignette effect in CSS" 🔥
I've also built a CSS generator for this effect so you can easily drop it in your projects.
More details below 👇
Delivered some value last week! Next.js canary now automatically optimizes barrel file imports of popular libs (lucide-react, react-bootstrap, ant-design/icons, etc.).
A more advanced config is also available for your internal component system to use:
Performance is a top priority of SWR.
On this dedicated docs page, we’ll explain why and how SWR ensures your app to be always fast and reactive:
✅ No extra requests
✅ No extra re-renders
✅ No extra code imported
Beta test the VSCode
@zeithq
color scheme:
- `curl | tar xvz -C ~/.vscode/extensions`
- Restart VSCode, select `ZEIT` in `Preferences > Color Theme`
- Send us feedback!
Thank you
@rauchg
! I didn’t mention it that much in public, but it was indeed one of the most tough times in my life. And it’s great to have the support from everyone
@zeithq
. We will make it through! 👋🦠🌞
The Next.js TypeScript plugin is quite helpful. However, there is no way to enable a TS Language Server plugin by default in VS Code.
To avoid picking Workspace TS Version every time when opening a project, I made this extension to do it automatically:
One year ago, I switched to the Next.js team to work on React 18 and React Server Components support with
@huozhi
. Happy to see them landed and running as the core of Next.js 13 to empower some of these incredible new features.