NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4512 most downloaded on npm
Simple, scalable state management.
Last release 29 days ago
19 Aug 2026
Release timing varies
gaps range from 1 weeks to 7 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
264 releases · first in 2016
`d2a2a52e` #2763 Thanks @vkrol! - Add safeDescriptors to configure options type
`ca09f2f5` #2761 Thanks @urugator! - configure({ safeDescriptors: false }) now forces all props of observable objects to be writable and configurable
One column per quarter.
`39eca50d` #2757 Thanks @urugator! - Fix error stringification on minified build Fix isObservableProp not supporting Symbols Fix makeAutoObservable no
Removed deprecated action.bound("name")
This release fixes a plethora of bugs related to sub-classing and reflecting / iterating on observable objects. The behavior of MobX is in many edge cases much more explicitly defined now.
A new annotation was introduced: @override / override to support re-defining actions and computed values(!) on sub classses.
For idiomatic MobX usage this release should have little impact, but if you are using a lot of sub-classing, reflection APIs or direct object manipulations like defineProperty,
this release might introduce previously unseen errors for cases that silently failed before, or even worked successfully even though the correct behavior wasn't specified earlier.
If you are migrating from MobX 4/5 we strongly recommend to go to 6.1 in one go, and skip 6.0.*, as some buggy behavior compared to the previous majors has been corrected.
As always, our libraries come as-is and are maintained by volunteers. Upgrades are at own risk and voluntary. Bug reports require a minimal reproductions and a correctly filled out issue template.
Support the ongoing maintenance at: https://opencollective.com/mobx
28f8a11d #2641 Thanks @urugator!
action, computed, flow defined on prototype can be overridden by subclass via override annotation/decorator. Previously broken.this) is not supported and should throw. Previously partially possible or broken.Object.defineProperty. Previously unsupported/broken.extendObservable/makeObservable/defineProperty notifies observers/listeners/interceptors about added props. Previously inconsistent.keys/values/entries works like Object.keys/values/entries. Previously included only observables.has works like in. Previously reported true only for existing own observable props.set no longer transforms existing non-observable prop to observable prop, but simply sets the value.remove/delete works with non-observable and computed props. Previously unsupported/broken.options to observable/extendObservable/makeObservable throws if the object is already observable . Previously passed options were mostly ignored.autoBind option is now sticky - same as deep and name option.observable/extendObservable now also picks non-enumerable keys (same as make[Auto]Observable).action.bound("name")Reflect API. Previously throwing instead of returning booleans.`6b304232` #2644 Thanks @rokoroku! - Fix broken error reference in errors.ts
dea1cf18 #2726 Thanks @mweststrate! - fix: onBecomeObserved was not triggered correctly for computed dependencies of computeds. Fixes #2686, #2667🚨🚨🚨 If you are upgrading from V4/V5, please follow the migration guide.
`79a09f49` #2615 Thanks @urugator! - Fix #2614 - makeObservable does not respect options.name
`d0e6778d` - Create ESM bundles with NODE_ENV correctly replaced so it can be used in browser
d0e6778d - Create ESM bundles with NODE_ENV correctly replaced so it can be used in browser (#2564)`b5d64d19` #2548 Thanks @urugator! - Fixed 2542, makeAutoObservable not respecting deep option @urugator
Fixed issue in TS typings of makeObservable in combination with a member named toString()
makeObservable in combination with a member named toString()`makeObservable(target, annotations)` is now the recommended way to make objects with a fixed shape observable, such as classes.
makeObservable(target, annotations) is now the recommended way to make objects with a fixed shape observable, such as classes.makeAutoObservable(target) will automatically determine the annotations used by makeObservable. Methods will be marked as 'autoAction', so that they can be used both from a computed value or as standalone method.observable.array now supports { proxy: false } as option.reaction's effect function now receives the previous value seen by the reaction as second argument.flow can now be used as annotation as well. You might need flowResult in case you use TypeScript to extract the correct result type. details.decorate API has been removed, and needs to be replaced by makeObservable in the constructor of the targeted class. It accepts the same arguments. The mobx-undecorate can transform this automatically.extendObservable / observable, fields that contained functions used to be turned into observables. This is no longer the case, they will be converted into autoActions.observed mode.toJS no longer takes any options. It no longer converts Maps and Sets to plain data structures. Generic, flexible serialization of data structures is out of scope for the MobX project, and writing custom serialization methods is a much more scalable approach to serialization (tip: leverage computeds to define how class instances should be serialized).intercept and observe are no longer exposed on observable arrays, maps and boxed observables. Import them as utility from mobx instead: import { observe, intercept } from "mobx", and pass the collection as first argument: observer(collection, callback). Note that we still recommend to avoid these APIs.observableMap.toPOJO(), observableMap.toJS() have been dropped. Use new Map(observableMap) instead if you want to convert an observable map to a plain Map shallowly.observableMap.toJSON() now returns an entries array rather than a new Map, to better support serialization.observableSet.toJS() has been dropped. Use new Set(observableSet) instead if you want to convert an observable Set to a plain Set shallowly.observableSet.toJSON() now returns an array rather than a new Set, to better support serialization.isArrayLike is no longer exposed as utility. Use Array.isArray(x) || isObservableArray(x) instead.@observable or makeObservable) that is already declared in a super class.runInAction no longer supports passing a name as first argument. Name the original function or use action(name, fn)() if you care about the debug name.computed(getterFn, setterFn) no longer accepts a setter function as a second argument. Use the set option instead: computed(getterFn, { set: setterFn }).findIndex / find method, the offset argument (the third one) is no longer supported, to be consistent with ES arrays.computedConfigurable of configure is no longer supported as it is now the default.observableArray.toJS() has been removed, use observableArray.slice() instead, which does the same.IGNORE_MOBX_MINIFY_WARNING environment flag._allowStateChangesInComputation(fn) is no longer needed, use runInAction(fn) instead.computed, the when predicate (first arg), and reaction predicate (first arg) it is now forbidden to directly change state. State changes should be done in their effect functions, or otherwise at least wrapped in runInAction (only the state change, not the observables you want to track!). Note that this is still an anti-pattern.observableArray.get() and observableArray.set() methods are no longer supported.IObservableObject interface is no longer exported from MobX.reaction effect function, the disposer object, is now passed in as third argument. The second argument is now the previous value seen by the reaction.onBecomeObserved / onBecomeUnobserved will now only trigger for observables that are actually used by a reaction (see #2309 for background).this for array callbacks such as in array.forEacharray.concaton(un)BecomeObservedon(un)BecomeObserved was triggered for observables changed in actions without having an observerNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
The minimum required TypeScript version is now 3.6
The minimum required TypeScript version is now 3.6
FlowCancellationError instance whose error message is the same as in previous versions ("FLOW_CANCELLED") so this is not breaking. #2172 by @vonovakCancellablePromise Flow type is exported. #2164 by @vonovakFixed installation issue trying to run postinstall hook for a website #2165.
postinstall hook for a website #2165.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed a recent regression where array update events would send undefined as change.object through #1985 by xaviergonz
change.object through #1985 by xaviergonzNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixed #1667: creating a large array could result in undefined items (MobX 4.\* was not affected)
Fixed #1685: expose IAutorunOptions
IAutorunOptionsdecorate now can apply multiple decorators, by accepting an array and applying them right to left: decorate(Todo, { title: [serializable(primitive), persist('object'), observable] }). By @ramybenaroya through #1691 and #1686flow so that it accepts async generators. By @dannsam through #1656 and #1655keys() now also supports arrays. Fixes #1600 through #1601 by @nunocastromartinsFixed issue where it was no longer possible to define custom properties on observable arrays
Fixed issue where iterators where not compiled to ES5, breaking the ES5 based builds.
All earlier deprecated APIs are dropped. Make sure to not have any deprecation warnings before upgrading.
MobX 5 is the first MobX version fully leveraging Proxies. This has two big advantages
Proxies. See the browser support for details.Proxy API.spy has become a no-op in production buildsarray.move and array.peek are removed from the APIarray.find and array.findIndex since they were not standardized in ES..$mobx property has been dropped from all observables and replaced by a Symbol. Instead of using x.$mobx.name, use import { $mobx } from "mobx"; x[$mobx].name etc.proxy: false argument to observable.object to disable proxying (theoretically slightly faster, but removes no dynamic key addition)[mobx] Dynamic observable objects cannot be frozen]. A place where that might happen unexpectedly is when passing an observable object as style property to a React component. Like <span style={someObservableObject} />, since React will freeze all style objects. The work-around is to simply pass a fresh, non-observable object for styling like: <span style={{...someObservableObject}} />.mobx with mobx-react, and you are upgrading mobx-react to the MobX 5 compatible version (mobx-react@5.2.0) you will notice that this.props or this.state are not yet observable in the constructor or componentWillMount. This is for forward compatibility with React 16.3 where componentWillMount has been deprecated. In most cases using componentDidMount instead will suffice, especially when the goal is to setup reactions. For more info see #478.componentWillMount😎.toEqual might throw an error allKeys[x].match is not a function when trying to equal observable arrays. This is a bug in Jest report. The simple work around for now is to slice (or toJS if the problem is recursive) the array first.toEqual matcher might no longer correctly equal your class instances, complaining about differences in the MobX adminstration. This is due to a bug with the processing of symbols: report. For now you might want to use a custom matcher if you are directly equalling observable objects. As a work around toJS(object) could be used before diffing.Note June 7th, 2018: Both issues are already in Jest master and should be released soon.
slice() arrays when passing them to external libraries. (Note you still shouldn't pass observable data structures to non-observer React components, which is an orthogonal concept)reverse or sort operations directly on observableArray's anymore, as it's behavior slightly differed from the built-in implementations of those methods. Instead use observableArray.slice().sort() to perform the sort on a copy. This gives no additional performance overhead compared to MobX 4. (The reason behind this is that built-in sort updates the array in place, but the observable array implementation always performed the sort on a defensive copy, and this change makes that explicit).isArrayLike() since Array.isArray() will now return true for observable arraysarrayBuffer setting is no longer supported by configure (it has become irrelevant)observable.shallowBox, observable.shallowArray, observable.shallowMap, observable.shallowObject, extendShallowObservable api's have been removed. Instead, pass { deep: false } to their non-shallow counter parts.observableArray.peek, observableArray.moveNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →