New Framework Lets Devs Explore React Server Components
There’s now a minimal framework for React Server Components called Waku — Japanese for “frame or framework.” While it’s not recommended for production yet, it is ready for developers who want to explore RSC’s capabilities, said its creator.
Daishi Kato wrote Waku, as well as Zustand (a state management library for React applications) and Jotai (another state management tool, for which he built the library). Waku is being actively developed toward the production level, he said.
“At this point, it’s ready to play with it, which means you can try and learn RSC behaviors, you can implement a new app with RSC features, and you can try to migrate an existing app to Waku,” Kato told The New Stack. “However, we don’t officially recommend it for production yet, as the APIs may still change.”
Why Another JS Framework?
“We want to learn RSC, but it’s often tied with other features in a framework,” Kato explained. “I would like to separate them and I expect this will help people to learn and understand RSC better.”
Developers also want a minimal framework, he said, adding that React use cases are broad.
“SPA is still one of the major use cases,” he said. “Richer frameworks provide more features that SPA doesn’t require.”
Plus, Kato wanted to add support for RSC to Zustand and Jotai. He didn’t want to wait for other frameworks to create that opportunity for him, so he decided to create his own framework.
“RSC still relies on a framework — or at least a bundler — for implementation. However, as frameworks introduce RSC on top of their existing static site generation (SSG) and server-side rendering (SSR) capabilities, learning and experimenting with how to develop applications or libraries solely with RSC features are somewhat complicated,” Kato explained on a site about and developed on Waku.
Waku allows developers to explore the core RSC capabilities and RSC best practices “independent of traditional SSG/SSR strategies, which are optional opt-in functionalities,” he wrote.
But what developers learn about RSC with Waku should be transferable to other frameworks, he told The New Stack.
“The good news is that Waku’s original API is very minimal, so what you learn about RSC is mostly common between Waku and other frameworks,” he said.
What Waku Includes
To use Waku, developers do need to know React well and have a basic understanding of RSC, both of which can be garnered from React and Next.js documentation, he said.
Bytes noted that Waku provides a server API, a client API, and routing that comes with an optional client-side and server-side router.
“Vite is a bundler and it’s pretty extensible,” he said. “Vite also provides a dev server, which is also a fundamental feature for better DX.”
While Waku allows developers to try RSC outside Vercel, which maintains Next.js. Vercel sponsored Waku via GitHub and it’s possible to deploy to Vercel’s platform.