MobX release notes, breaking changes, and upgrade notes.
Simple, scalable state management through reactive programming StackPulse turns upstream changelogs into scannable summaries with risky changes, deprecations, migration notes, and source links.
This release focuses on performance improvements and bug fixes. It optimizes `NODE_ENV` evaluation in ESM bundles for faster observable writes in dev mode and fixes `ObservableSet.replace` to avoid spurious events and preserve iteration order.
affected
Developers using `ObservableSet.replace` may be affected by changes in iteration order.
action
Review usage of `ObservableSet.replace` if your code relies on specific iteration order.
release_signals
-`ObservableSet.replace` no longer reorders the set to match its argument. Surviving values retain their original position, and new values are appended.
+Optimized `NODE_ENV` evaluation in ESM bundles for faster observable writes in dev mode.
This major release introduces MobX 7, mobx-react-lite 5, and mobx-react 10, focusing on modern runtime and decorator model cleanup. It removes deprecated APIs, reduces bundle sizes, and requires MobX 7 and React 18 or later.
affected
Developers using MobX, mobx-react-lite, or mobx-react with older versions of MobX or React are affected.
action
Upgrade to MobX 7, mobx-react-lite 5, and mobx-react 10, and ensure React 18 or later is used.
MobX 7 is a cleanup release focused on modern runtime and decorator model, removing legacy APIs and reducing bundle sizes. It requires React 18+ and drops support for non-Proxy fallbacks and legacy decorators.
affected
Users of MobX 6 or earlier, especially those using legacy decorators, non-Proxy fallbacks, or removed React binding APIs, are affected.
action
Upgrade to MobX 7 and update your code to use the new named exports and modern React binding APIs.
release_signals
-Removed ES5/non-proxy fallback; MobX now always uses Proxy-backed observable objects and arrays.
This release introduces MobX 7, mobx-react-lite 5, and mobx-react 10, focusing on modern runtime and decorator model cleanup. It removes deprecated compatibility paths, reduces bundle sizes, and requires MobX 7 and React 18 or later.
affected
Users of MobX, mobx-react-lite, and mobx-react who rely on deprecated APIs, ES5/non-proxy fallback, or legacy decorators are affected.
action
Update your code to use the new named exports and APIs, and ensure compatibility with MobX 7 and React 18 or later.
release_signals
-Removed ES5/non-proxy fallback; `configure({ useProxies: ... })` and `{ proxy: false }` options are no longer supported.
-
-
`configure({ useProxies: ... })` is no longer supported.
-`{ proxy: false }` options for `observable`, `observable.object`, and `observable.array` are no longer supported.
-The public `trace` API and its related runtime support have been removed.
!`Provider`, `inject`, and `MobXProviderContext`; use `React.createContext` directly.
!`disposeOnUnmount`; dispose reactions in `componentWillUnmount` or return cleanup functions from `useEffect`.
!`PropTypes`; use TypeScript or the regular `prop-types` package.
!`useObserver`; wrap components with `observer` or use `<Observer>`.
!`useLocalStore`; use `useLocalObservable`.
+MobX now always uses Proxy-backed observable objects and arrays.
+Namespaced annotation and comparer properties now use named exports to reduce bundle size.
+`mobx-react-lite` remains the function-component package.
+`mobx-react` remains a thin wrapper around `mobx-react-lite` for class-component support.
+React 18+ renderers handle batching, removing the need for explicit batching imports.
migration_steps5 steps
01Remove React batching imports, including the stale React Native batching deep import.
02Use `React.createContext` directly instead of `Provider`, `inject`, and `MobXProviderContext`.
03Dispose reactions in `componentWillUnmount` or return cleanup functions from `useEffect` instead of using `disposeOnUnmount`.
04Wrap components with `observer` or use `<Observer>` instead of `useObserver`.
05Use `useLocalObservable` instead of `useLocalStore`.
+Recommended public React binding surface includes `observer`, `Observer`, `useLocalObservable`, `enableStaticRendering`, and `isUsingStaticRendering`.
migration_steps5 steps
01Use `React.createContext` directly instead of `Provider`, `inject`, and `MobXProviderContext`.
02Dispose reactions in `componentWillUnmount` or return cleanup functions from `useEffect` instead of using `disposeOnUnmount`.
03Use `useLocalObservable` instead of `useLocalStore`.
04Synchronize values from props into local observable state explicitly instead of using `useAsObservableSource`.
05Use `enableStaticRendering` instead of `useStaticRendering`.