Skip to content
Bunshi
GitHub

Bunshi

A tiny, fast, dependency-free 1.18kb library for creating states stores and other dependencies that lets you lift state up or push state down.

Bunshi (formerly known as jotai-molecules) was born out of the need to create lots of state atoms for jotai, but it evolved as a general dependency injection tool for various state managers including jotai atoms, valtio proxies, zustand stores, nanostores, vue refs and others. Stay tuned for how to use bunshi with your favorite state management library, form or RPC library.

Definition: bunshi - ぶん‐し【分子】- Japanese for molecule

Features

Small

Dependency-free and only 1.18kb minified and gzipped.

Flexible

Works with any frontend or backed javascript framework. Ships with React and Vue integrations.

Tested

Rigorously tested with high test coverage.

Efficient

Based on WeakMap to prevent memory leaks. Uses memoization to pevent unnecessary re-renders.

Integrations

Bunshi ReactDeclaratively build your jotai, valtio, zustand, nanostore and other state stores.
Bunshi VueDeclaractively build your refs, jotai, nanostore and other state stores.