mobxjs/mobx
 Watch   
 Star   
 Fork   
8 days ago
mobx

mobx@7.0.6

Patch Changes

  • 4b1c8d3ea2b3de1a2ae852fd5631e33d28a82b15 #4721 Thanks @giaBaoJS! - fix: assigning length on an observable array now respects intercept. A cancelled or modified splice used to be overridden by a direct write to the backing array, which truncated it without notifying observers and made the next mutation throw "Modification exception". A non-integer length now throws "Out of range" before touching the array.

  • 60be47cab0926d12f22449ec6c809fb5ec6601c4 #4716 Thanks @AcEKaycgR! - fix: observable.box(array) no longer warns under observableRequiresReaction when a spy is active. The create spy event now reports newValue as the value itself rather than a string, matching the declared IBoxDidChange type. Previously the constructor stringified the value, and stringifying an observable array reads its length, which counted as an observable read outside a reactive context. Spy listeners that relied on newValue being a string for create events will now receive the raw value.

  • 3551aeb051ff922717b03c4fbc04a6b98f7f3b3e #4717 Thanks @breken-ai! - Remove the signal abort listener when a reaction disposes itself (r.dispose() or a resolved when), so long-lived AbortSignals no longer accumulate listeners that keep disposed reactions in memory

  • 7e4e27dbfbf0b56770a11e9cba913e5d49c0c6f8 #4718 Thanks @breken-ai! - observe/spy add events of an observable Set now report the value that was actually stored (e.g. the observable copy of a plain object), matching ObservableMap and observable arrays, so set.has(change.newValue) holds

15 days ago
mobx

mobx@7.0.5

Patch Changes

  • 105d66d73529812a8eddc0847891e7f0c574e129 #4713 Thanks @xaviergonz! - perf: reduce memory used by large, mostly unobserved state. intercept / observe handler arrays are allocated at their exact size, an observable's internal observers Set is released once its last observer leaves, observable objects created with the same deep / autoBind options share one default annotation instead of allocating their own, and endBatch() skips the unobservation pass when nothing is pending.
16 days ago
mobx

mobx-react-lite@5.1.0

Minor Changes

  • f78cb1607283e26ddae508b457eabcde295212a2 #4709 Thanks @kubk! - Clean up reactions from uncommitted observer renders using the existing timed fallback even when native finalization is available. This releases subscriptions retained by suspended renders while preserving reactivity on retry.

    In environments with native finalization, defer cleanup registration to a shared microtask so synchronous subscriptions avoid native registrations and timers.

18 days ago
mobx

mobx@7.0.4

Patch Changes

18 days ago
mobx

eslint-plugin-mobx@0.1.0

Minor Changes

2026-08-19 23:59:31
mobx

mobx@7.0.3

Patch Changes

  • 6f002b8e543ca39d3ee23681e28848d7f1724fae #4696 Thanks @gesposito! - perf: add a node export condition that routes Node and Bun to the existing dist/index.js entry, which picks the prebaked development or production CJS build once at require time. importing mobx in Node no longer executes the env-agnostic dist/mobx.mjs with per-call NODE_ENV checks, and mixing import and require in one Node app now yields a single mobx instance.
2026-08-19 23:59:31
mobx

mobx-react@10.0.2

Patch Changes

  • 6f002b8e543ca39d3ee23681e28848d7f1724fae #4696 Thanks @gesposito! - perf: add a node export condition that routes Node and Bun to the existing dist/index.js entry, which picks the prebaked development or production CJS build once at require time. importing mobx in Node no longer executes the env-agnostic dist/mobx.mjs with per-call NODE_ENV checks, and mixing import and require in one Node app now yields a single mobx instance.

  • Updated dependencies [6f002b8e543ca39d3ee23681e28848d7f1724fae]:

    • mobx-react-lite@5.0.3
2026-08-19 23:59:31
mobx

mobx-react-lite@5.0.3

Patch Changes

  • 6f002b8e543ca39d3ee23681e28848d7f1724fae #4696 Thanks @gesposito! - perf: add a node export condition that routes Node and Bun to the existing dist/index.js entry, which picks the prebaked development or production CJS build once at require time. importing mobx in Node no longer executes the env-agnostic dist/mobx.mjs with per-call NODE_ENV checks, and mixing import and require in one Node app now yields a single mobx instance.
2026-08-19 22:37:46
mobx

mobx@7.0.2

Patch Changes

  • ec1b708026c1578e1c1f6c7bd90be18b26f7ce85 #4695 Thanks @gesposito! - perf: evaluate NODE_ENV once at module scope in the env-agnostic esm bundles (dist/<pkg>.esm.js and dist/<pkg>.mjs) instead of at every __DEV__ call site. process.env is an exotic object in Node, so each check performed a real environment lookup on hot paths; consumers that execute these files as-is (Node ESM, vitest, SSR) see roughly 10x faster observable writes in dev mode. All env-set artifacts and bundler output are unchanged.

  • 6d8b5fa6c7596d7e5b16e55e3121d81c0c5bb21a #4672 Thanks @chatman-media! - Fix ObservableSet.replace emitting spurious delete/add events (and triggering reactions) for values that are unchanged. It now only fires delete for removed values and add for newly added ones, mirroring ObservableMap.replace.

    Note: because replace no longer clears and re-adds every value, the iteration order after replace changes in a (subtle but observable) way. Surviving values now keep their original relative position and newly added values are appended, instead of the whole set being reordered to match the argument. For example, set(["a", "b", "c"]).replace(["d", "b", "a"]) previously iterated as d, b, a, and now iterates as a, b, d. This is arguably the more correct behavior (unchanged values are genuinely unchanged), but if you relied on replace reordering the set to match its argument, you may need to adjust.

2026-08-19 22:37:46
mobx

mobx-react@10.0.1

Patch Changes

  • ec1b708026c1578e1c1f6c7bd90be18b26f7ce85 #4695 Thanks @gesposito! - perf: evaluate NODE_ENV once at module scope in the env-agnostic esm bundles (dist/<pkg>.esm.js and dist/<pkg>.mjs) instead of at every __DEV__ call site. process.env is an exotic object in Node, so each check performed a real environment lookup on hot paths; consumers that execute these files as-is (Node ESM, vitest, SSR) see roughly 10x faster observable writes in dev mode. All env-set artifacts and bundler output are unchanged.

  • Updated dependencies [ec1b708026c1578e1c1f6c7bd90be18b26f7ce85]:

    • mobx-react-lite@5.0.2