github mobxjs/mobx-state-tree v7.0.0-pre.1

latest release: v7.0.0-pre.2
pre-release2 months ago

Breaking Changes

  • Validate state tree instances instead of snapshots in the SnapshotProcessor.is override by @airhorns in #2182

Migration Path

For most users, migrating from v6 -> v7 will be straightforward and require no work. However, we have made a breaking change in the assumption for types.snapshoProcessor and its is method.

In v6, we validated processed snapshots in this method. But now we will only validate instances. If you upgrade to v7 and all of your TypeScript types and runtime tests are passing, no additional work necessary on your end.

If this change has broken you, it may in fact be surfacing subtle bugs or gaps in your type modeling where your codebase is considering two different types to be "the same" because they have matching SnapshotOut shapes. If you need to preserve that behavior in your codebase, you might consider writing custom logic to check for this type of equality. MST is specifically taking a stance to check against Instances and valid SnapshotIn types.

Full Changelog: v6.0.1...v7.0.0-pre.1

Don't miss a new mobx-state-tree release

NewReleases is sending notifications on new releases.