Introducing Waku: The Minimal React Framework

Rate this content
Bookmark
Waku is a minimal React framework that leverages React Server Components (RSC) for design and implementation. It offers features like code splitting, routing, data fetching, and server-side rendering (SSR). Developers can start a new project using the npm create-waku-at-latest command and benefit from hot reload and hot module replacement. Waku aims to provide a fast developer experience with a minimal learning curve. It supports deploying on various cloud services, including Vercel, and is currently under active development. Waku integrates well with state management libraries like Jotai and aims to be router-agnostic. The project is ideal for small to medium-sized applications and can also build static sites for deployment on any hosting service. More details and tutorials are available on the waku.gg website.

From Author:

Waku is an ongoing project aimed at developing a React framework with first-class support for React Server Components. In this talk, I will provide an overview of Waku and walk you through how you can start developing a new project using Waku.

This talk has been presented at React Summit 2024, check out the latest edition of this React Conference.

FAQ

Waku is a React framework that heavily depends on React Server Components (RSC) for design and implementation. It aims to provide capabilities like code splitting, routing, data fetching, and generating HTML, focusing on delivering a faster developer experience for small to medium-sized projects.

The developer behind Waku is Daishi Kato, who specializes in developing React libraries, including Rustand, Jotai, and Valisio.

To start a new Waku project, run the command npm create-waku-at-latest. You will be asked for a project's name, and after that, move into the folder and run npm install. To start the development server, run npm run dev.

Key features of Waku include code splitting, routing, data fetching, generating HTML (SSR), and bundling for production. Waku also focuses on providing a fast developer experience and a minimal learning curve.

Waku uses React Server Components (RSC) for server-side rendering and supports async components for data fetching. It also employs hot reload for server components and hot module replacement for client modules to improve the development experience.

Rustand, Jotai, and Valisio are React state management libraries developed by Daishi Kato. Rustand is a minimal state management library, Jotai abstracts states as atoms, and Valisio enables a JavaScript object to be a React state using proxies.

You can deploy a Waku project on various cloud services like Vercel, Netlify, Cloudflare Workers, DenoDeploy, PartyKit, and AWS Lambda. For Vercel, simply run the Vercel command to build and deploy the project.

The motivation behind developing Waku is to leverage the capabilities of React Server Components (RSC) to build a React framework that offers a faster developer experience and minimal learning curve, targeting small to medium-sized projects.

Waku is currently under active development, working towards V1 alpha. Basic features are already available, and the team is focused on enhancing library compatibility, adding new features, and improving stability.

To learn more about Waku, you can visit the website waku.gg, where you can find basic information and tutorials. You can also follow Daishi Kato's activity on GitHub for more technical details and updates.

Daishi Kato
Daishi Kato
19 min
18 Jun, 2024

Comments

Sign in or register to post your comment.

Video Transcription

1. Introduction to Waku and React Libraries

Short description:

I will talk about my recent project, Waku, and my React libraries - Rustand, Jotai, and Valisio. Rustand is the most popular, while Jotai and Valisio have room for more attraction. People often ask me why I develop three similar libraries, and it's because I find it interesting to compare them.

Hi. First of all, thanks for this great opportunity to give a talk. I will talk about my recent project, Waku. It's an active project, so please note that what I talk about today might not be accurate in the future, but at least it is what it is now.

Before we dive into the main topic, let me introduce myself. My name is Daishi Kato, and I specialize in developing React libraries. You might already be using or at least have tried one of my libraries. Most of them are for React global states. If you haven't tried them before, I think it's a great chance to give them a shot.

Rustand is a state management library that is bare minimum and easy to learn. It's such a small library that I actually wondered if it was worth being a library. Nevertheless, it's widely used now.

Jotai is another state management library. It abstracts states as atoms. Atoms are definitions of states. With atom abstraction, we can define state logic. It's very handy. And the ecosystem is growing, too.

The third one is called Valisio. It enables a normal JavaScript object to be a React state. Usually, React state has to be immutable. But a JavaScript object is mutable. To bridge the gap between immutability and mutability, Valisio uses proxies extensively. It works like magic. To compare the popularity of these libraries, let's quickly check the number of NPM downloads. As you can see, Rustand is by far the most popular library. Jotai and Valisio have room to get more attraction.

By the way, people sometimes ask me why I develop three similar libraries. It's a long story. But what I found interesting is that I can compare these similar libraries.

2. Waku: A React Framework

Short description:

Waku is a React framework that depends heavily on React Server Components (RSC). It provides capabilities like code splitting, routing, data fetching, and SSR. The framework's job is to make these capabilities available to developers. Bundling with RSC and SSR can be tricky.

Not only can we compare the statistics, but we also get triple feedback. As you might expect, this results in triple the workload.

Well, that's enough for my introduction. Let's move on.

So, what is Waku? I started the project in March 2023. Waku is a React framework. It actually means framework in Japanese. Waku depends heavily on React Server Components, or RSC. Both in terms of the design and the implementation. Our current target is small to medium-sized projects. And we focus on delivering a faster developer experience.

Now, let's discuss a bit more in detail for each aspect. What exactly is a React framework? Honestly, I don't think I have the right answer to this question. But anyway, in the React docs they mention React should be used with a framework. And such a framework should provide capabilities like code splitting, routing, data fetching and generating HTML. Waku provides those capabilities. It supports code splitting. It does routing. We can fetch data. And generating HTML, also known as SSR, is supported. However, that doesn't mean we implement everything in a framework. The basic parts of those capabilities are already implemented by the React library. So, the framework's job is basically to make them available to developers.

Another big job of the framework is bundling. It's to generate the final output for production, which might vary depending on the cloud service used for deployment. I found bundling is tricky with RSC and SSR. To be honest, I don't think I fully understand every detail yet. Let's move on to the next topic, RSC. RSC. Waku is based on React components.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Simplifying Server Components
React Advanced Conference 2023React Advanced Conference 2023
27 min
Simplifying Server Components
Top Content
Watch video: Simplifying Server Components
React server components simplify server-side rendering and provide a mental model of components as pure functions. Using React as a library for server components allows for building a basic RSC server and connecting it to an SSR server. RSC responses are serialized virtual DOM that offload code from the client and handle interactivity. The client manifest maps serialized placeholders to real components on the client, enabling dynamic rendering. Server components combine the best of classic web development and progressive enhancement, offering the advantage of moving logic from the client to the server.
Building Better Websites with Remix
React Summit Remote Edition 2021React Summit Remote Edition 2021
33 min
Building Better Websites with Remix
Top Content
Remix is a web framework built on React Router that focuses on web fundamentals, accessibility, performance, and flexibility. It delivers real HTML and SEO benefits, and allows for automatic updating of meta tags and styles. It provides features like login functionality, session management, and error handling. Remix is a server-rendered framework that can enhance sites with JavaScript but doesn't require it for basic functionality. It aims to create quality HTML-driven documents and is flexible for use with different web technologies and stacks.
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Watch video: Speeding Up Your React App With Less JavaScript
Mishko, the creator of Angular and AngularJS, discusses the challenges of website performance and JavaScript hydration. He explains the differences between client-side and server-side rendering and introduces Quik as a solution for efficient component hydration. Mishko demonstrates examples of state management and intercommunication using Quik. He highlights the performance benefits of using Quik with React and emphasizes the importance of reducing JavaScript size for better performance. Finally, he mentions the use of QUIC in both MPA and SPA applications for improved startup performance.
Full Stack Documentation
JSNation 2022JSNation 2022
28 min
Full Stack Documentation
Top Content
The Talk discusses the shift to full-stack frameworks and the challenges of full-stack documentation. It highlights the power of interactive tutorials and the importance of user testing in software development. The Talk also introduces learn.svelte.dev, a platform for learning full-stack tools, and discusses the roadmap for SvelteKit and its documentation.
Exploring React Server Component Fundamentals
React Day Berlin 2023React Day Berlin 2023
21 min
Exploring React Server Component Fundamentals
Top Content
Watch video: Exploring React Server Component Fundamentals
This Talk introduces React Server Components (RSC) and explores their serialization process. It compares RSC to traditional server-side rendering (SSR) and explains how RSC handles promises and integrates client components. The Talk also discusses the RSC manifest and deserialization process. The speaker then introduces the Waku framework, which supports bundling, server, routing, and SSR. The future plans for Waku include integration with client state management libraries.
SolidJS: Why All the Suspense?
JSNation 2023JSNation 2023
28 min
SolidJS: Why All the Suspense?
Top Content
Suspense is a mechanism for orchestrating asynchronous state changes in JavaScript frameworks. It ensures async consistency in UIs and helps avoid trust erosion and inconsistencies. Suspense boundaries are used to hoist data fetching and create consistency zones based on the user interface. They can handle loading states of multiple resources and control state loading in applications. Suspense can be used for transitions, providing a smoother user experience and allowing prioritization of important content.

Workshops on related topic

Building WebApps That Light Up the Internet with QwikCity
JSNation 2023JSNation 2023
170 min
Building WebApps That Light Up the Internet with QwikCity
Featured WorkshopFree
Miško Hevery
Miško Hevery
Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.
QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.
Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.
Back to the Roots With Remix
React Summit 2023React Summit 2023
106 min
Back to the Roots With Remix
Featured Workshop
Alex Korzhikov
Pavlik Kiselev
2 authors
The modern web would be different without rich client-side applications supported by powerful frameworks: React, Angular, Vue, Lit, and many others. These frameworks rely on client-side JavaScript, which is their core. However, there are other approaches to rendering. One of them (quite old, by the way) is server-side rendering entirely without JavaScript. Let's find out if this is a good idea and how Remix can help us with it?
Prerequisites- Good understanding of JavaScript or TypeScript- It would help to have experience with React, Redux, Node.js and writing FrontEnd and BackEnd applications- Preinstall Node.js, npm- We prefer to use VSCode, but also cloud IDEs such as codesandbox (other IDEs are also ok)
Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
WorkshopFree
Alice De Mauro
Alice De Mauro
- Introduction- Prerequisites for the workshop- Fetching strategies: fundamentals- Fetching strategies – hands-on: fetch API, cache (static VS dynamic), revalidate, suspense (parallel data fetching)- Test your build and serve it on Vercel- Future: Server components VS Client components- Workshop easter egg (unrelated to the topic, calling out accessibility)- Wrapping up
The Gateway to Backend: A Frontend Developer's Guide to Full-Stack Development
React Summit US 2023React Summit US 2023
160 min
The Gateway to Backend: A Frontend Developer's Guide to Full-Stack Development
Top Content
WorkshopFree
Amy Dutton
Amy Dutton
This workshop will guide you through the product development life cycle of creating a real-world web application. You will learn about React Server Components, building a design system within Storybook, and using frontend development to approach becoming a full-stack developer. The workshop will cover increasing confidence in your application with unit tests and implementing authentication and authorization. You'll have the opportunity to work through product features and examine a real-world RedwoodJS project, gaining valuable experience in real-world product development. RedwoodJS makes it simple to approach full-stack development, and this workshop will give you the skills you need to create your own real-world web applications.
Advanced Application Deployment Patterns with React Server Components (feat. a DIY RSC Framework)
React Summit US 2023React Summit US 2023
104 min
Advanced Application Deployment Patterns with React Server Components (feat. a DIY RSC Framework)
Top Content
WorkshopFree
 Greg Brimble
Greg Brimble
The developer ecosystem is always moving fast and this year has proved no exception. React Server Components can offer a significant improvement to developer experience and to application performance. But I think it's fair to say that this new server-first paradigm can be tricky to wrap your head around!In the first half of this workshop, we'll explore React Server Components from the ground-up: building our own mini meta-framework to help us understand how RSCs work. We'll discover exactly what is produced by an RSC build and we'll connect those pieces together to form a full application.Next, we'll deploy it! Cloudflare have also had a busy year too — Smart Placement, in particular, is a new technology that we've developed which fits the RSC model perfectly. We'll explore why that makes sense for our workshop app, and we'll actually deploy it onto the Cloudflare Developer Platform.Finally, we'll build out our app a little further, using D1 (our serverless SQL database) to really show off the React Server Component's power when combined with Smart Placement.You should come away from this workshop with a greater understanding of how React Server Components work (both behind-the-scenes and also how you as a developer can use them day-to-day), as well as insight into some of the new deployment patterns that are now possible after recent innovations in the platform space.
Building Reusable Server Components in NextJS
React Summit US 2023React Summit US 2023
88 min
Building Reusable Server Components in NextJS
Workshop
Will Bishop
Mettin Parzinski
2 authors
React continues to evolve their beta capability, React Server Components, and they're continuing to further develop them in partnership with frameworks like NextJS.In this workshop, attendees will learn what React Server Components are, how to effectively build and use them in NextJS, and focus on one of the major advantages of React/NextJS: reusability through components.We will also cover related beta technologies enabled by the `app` directory, such as nested layouts and server actions (alpha/experimental capability).Join us for this hands-on, 120 minute workshop!Technologies:
React, JavaScript/Typescript, NextJS, Miro