State that follows your reads

Write naturally. Render precisely. Scale when you need to.

A Zustand-style store with automatic render tracking and cached computed state built in. Start local; move the same model into workers or shared tabs later.

$ npm install coaction @coaction/react
counter.ts
const store = create((set) => ({
  count: 0,

  get doubled() {
    return this.count * 2
  },

  increment() {
    set(() => this.count++)
  }
}))

Automatic tracking

Components update for the fields they actually read.

Cached computed

Getter dependencies are tracked and invalidated automatically.

Natural updates

Write mutable-looking code and receive immutable state.

Shared when needed

Use an explicit JSON boundary for workers and shared tabs.