Case StudiesProductsBlogOpen SourceBook a call

dawei

Minimal, flexible state management for React.

dawei is a tiny but powerful state management library for React. Inspired by Zustand and Recoil, it provides a simple API that works without context—while still supporting deeply nested values, subscriptions, and scoped stores. It’s built for projects that want fine-grained control without boilerplate.

Links:


What it does

Installation

npm install dawei

or

yarn add dawei

Usage

import { createStore } from "dawei";

const formStore = createStore({});

const Input = () => {
  const [name, setName] = formStore.use("name");
  const [email, setEmail] = formStore.use("email");
  const [companyName, setCompanyName] = formStore.use("company.name");

  return (
    <form>
      <input value={name} onChange={(e) => setName(e.target.value)} />
      <input value={email} onChange={(e) => setEmail(e.target.value)} />
      <input
        value={companyName}
        onChange={(e) => setCompanyName(e.target.value)}
      />
    </form>
  );
};

function randomBitOfApi() {
  formStore.set({ saved: true });
}

const unsubscribe = formStore.subscribe((state) => {
  console.log("formStore changed", state);
});

Notes

Why it exists

React state patterns often drift toward either heavy ceremony (context + reducers) or brittle homegrown stores. dawei aims for the sweet spot: a tiny API with practical ergonomics, predictable behavior, and enough power to model real app state without bringing in a whole framework.

“Dawei gives us the store behavior we want — without the noise.” — The Sparkstone Team

This remind you of a problem you've been dealing with?

I'd be happy to discuss it with you and see if it's something we could turn into a solution.

Book a call

Newsletter

Subscribe to my newsletter to be the first to hear about what I do next