Waku: The Minimal React Framework

1.0.0-alpha.7 · active · verified Sun Apr 19

Waku is a minimal React framework designed for building performant web applications with a focus on React Server Components (RSC) and React 19 features. Currently in its v1.0.0-alpha.7 release, it is under active development with frequent alpha releases that may introduce breaking changes, particularly in adapters and internal APIs. Waku is optimized for marketing sites, blogs, headless commerce, and web apps where a lightweight footprint and full-stack React composability are key differentiators. Unlike heavier frameworks, it emphasizes a lean approach, prioritizing a fun developer experience with modern React paradigms. It supports all the latest React 19 features, including server components and actions, aiming for smaller client bundle sizes by leveraging server-side rendering extensively. It requires Node.js `^24.0.0`, `^22.12.0`, or `^20.19.0`.

Common errors

Warnings

Install

Imports

Quickstart

Sets up a basic Waku project with a configuration file, a main application router, and a client-side counter component to demonstrate interactivity and routing.

import { defineConfig } from 'waku';

export default defineConfig({
  rootDir: 'src',
  ssr: true,
  // Add custom Vite config if needed
  // vite: () => ({
  //   plugins: [],
  // }),
});

// src/app.tsx
import { Router, Link } from 'waku/router';

export const App = () => (
  <Router>
    <nav>
      <Link to="/">Home</Link>
      <Link to="/counter">Counter</Link>
    </nav>
    {/* Router handles rendering content based on current path */}
  </Router>
);

// src/pages/counter.tsx
'use client';

import { useState } from 'react';

export const Counter = () => {
  const [count, setCount] = useState(0);

  return (
    <>
      <h1>Client Counter</h1>
      <div>Count: {count}</div>
      <button onClick={() => setCount((c) => c + 1)}>Increment</button>
    </>
  );
};

// To run this example, create a new Waku project:
// npm create waku@latest my-app
// cd my-app
// npm install
// npm run dev

view raw JSON →