# Proposal: Observable State with Mutation History Tracking

**URL:** <https://es.discourse.group/t/proposal-observable-state-with-mutation-history-tracking/2567>\
**Category:** 💡 Ideas\
**Created:** [May 17, 2026, 11:07am UTC](https://es.discourse.group/t/proposal-observable-state-with-mutation-history-tracking/2567 "2026-05-17T11:07:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muddabirchohan](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/muddabirchohan/32/2675_2.png) [@Muddabirchohan](https://es.discourse.group/u/Muddabirchohan)\
**Post date:** [May 17, 2026, 11:07am UTC](https://es.discourse.group/t/proposal-observable-state-with-mutation-history-tracking/2567/1 "2026-05-17T11:07:38Z")

</div>

> **[GitHub - Muddabirchohan/observable-state-history-proposal: feature request repo...](https://github.com/Muddabirchohan/observable-state-history-proposal/tree/main)**
>
> main

There is no native way to:

track changes over time inspect previous values debug state transitions replay or revert changes Motivation

Modern applications require observability of state changes for:

debugging complex applications (React, Node.js, backend systems) audit logging in enterprise systems time-travel debugging (Redux DevTools-style tools) reactive programming models

Currently, developers rely on:

Proxy wrappers Redux / MobX / Zustand custom logging systems

This leads to inconsistent APIs and repeated implementation effort.

Proposed Solution

Introduce a built-in Observable API for state tracking.

API Design

1. Create observable state const user = Observable.state({ name: "Ali" });

2. Mutations are tracked automatically user.name = "Ahmed"; user.name = "Sara";

3. Access history user.history();

Returns:

```javascript
[{ path: "name", from: "Ali", to: "Ahmed", timestamp: 1710001 }, { path: "name", from: "Ahmed", to: "Sara", timestamp: 1710002 }] 4. Undo / Redo user.undo(); user.redo(); 5. Snapshot & restore const snapshot = user.snapshot();

user.restore(snapshot); 6. Configuration const user = Observable.state({ name: "Ali" }, { deep: true, maxHistory: 100, retention: "ring-buffer" }); Examples Example 1: Basic usage const counter = Observable.state({ value: 0 });

```

---

<div class="post-metadata">

**Author:** ![juner](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/juner/32/2377_2.png) [@juner](https://es.discourse.group/u/juner)\
**Post date:** [May 18, 2026, 1:34am UTC](https://es.discourse.group/t/proposal-observable-state-with-mutation-history-tracking/2567/2 "2026-05-18T01:34:40Z")

</div>

Perhaps that proposal would be better related to Signals?

> **[GitHub - tc39/proposal-signals: A proposal to add signals to JavaScript.](https://github.com/tc39/proposal-signals)**
>
> A proposal to add signals to JavaScript.
