Skip to content

Compat Comparison

Same counter app in four state management APIs — all backed by callbag-recharge's reactive engine.

Try it: Click the +/- buttons in each column. All four counters are independent but use the same underlying reactive primitives.

What it demonstrates

APIModuleHow it maps
callbag-rechargecorestate() + derived() — native API
Jotaicompat/jotaiatom() wraps state(), derived atoms wrap dynamicDerived()
Zustandcompat/zustandcreate() wraps state() with Zustand's set/get contract
TC39 Signalscompat/signalsSignal.State wraps state(), Signal.Computed wraps derived()

How it works

Each compat layer is a thin wrapper (~30-80 lines) that translates a familiar API into callbag-recharge primitives. The reactive engine is identical — same diamond resolution, same batching, same performance.

This means you can:

  • Migrate from Jotai/Zustand without rewriting everything at once
  • Use the API style your team prefers
  • Get callbag-recharge's operator ecosystem on any compat store

All tree-shakeable. Zero framework lock-in.

Released under the MIT License.