An early look at using server components via Bun’s new bundler, with and without React.
Server Components with Bun
The runtime is designed to be a drop-in replacement for node.js. BUN installs npm packages 20 times faster. What this means is it's actually creating a new Node modules folder and this is designed to be compatible with node.js. So you can use BUN install in node.js applications without using BUN's runtime.
BUN run starts package.json script 30 times faster. A lot of that is because we take really fast native code and we use that to parse your package.json and the rest.
From BUN's perspective, use server is mostly just code splitting. There's no react in this transform.
I'm going to show you a quick demo of server components in BUN. So I'm going to refresh the page, and you can see just real quick there, you saw it said awaiting child, acing child component, and then it transitioned.