61abc53f
#3852 Thanks @mweststrate! - Patched the release process, forcing release to get everything in pristine state.
b970cbb4
#3830 Thanks @dmitrytavern! - fix #3826: components make two renders because of the different state of the snapshots
1b8ab199
#3831 Thanks @kitsuned! - fix: ensure observer component name is only set when configurable
87e5dfb5
#3763 Thanks @mweststrate! - Switched observer implementation from using global to local state version. Fixes #3728
3ceeb865
#3732 Thanks @urugator! - fix: #3734:isolateGlobalState: true
makes observer stop to react to store changes
58bb052c
#3670 Thanks @urugator! - fix #3669: SSR:useSyncExternalStore
throws due to missinggetServerSnapshot
473cb3f5
#3718 Thanks @mweststrate! - - Fixedobserver
inStrictMode
#3671- [BREAKING CHANGE] Class component's
props
/state
/context
are no longer observable. Attempt to use these in any derivation other than component'srender
throws and error. For details see https://github.com/mobxjs/mobx/blob/main/packages/mobx-react/README.md#note-on-using-props-and-state-in-derivations - Extending or applying
observer
classes is now explicitly forbidden
- [BREAKING CHANGE] Class component's
8e58fa95
#3664 Thanks @mweststrate! - (Hopefully) fixed release process for mobx-react-lite
44a2cf42
#3590 Thanks @urugator! - Components now useuseSyncExternalStore
, which should prevent tearing - you have to update mobx, otherwise it should behave as previously.
Improved displayName/name handling as discussed in #3438.
4c5e75cd
#3382 Thanks @iChenLei! - replace the deprecated react type definition with recommended type definition
-
bd4b70d8
#3387 Thanks @mweststrate! - Added experimental / poor man's support for React 18. Fixes #3363, #2526. Supersedes #3005- Updated tests, test / build infra, peerDependencies to React 18
- [breaking icmw upgrading to React 18] Already deprecated hooks like
useMutableSource
will trigger warnings in React 18, which is correct and those shouldn't be used anymore. - [breaking icmw upgrading to React 18] When using React 18, it is important that
act
is used in unit tests around every programmatic mutation. Without it, changes won't propagate! - The React 18 support is poor man's support; that is, we don't do anything yet to play nicely with Suspense features. Although e.g. startTransition basically works, MobX as is doesn't respect the Suspense model and will always reflect the latest state that is being rendered with, so tearing might occur. I think this is in theoretically addressable by using
useSyncExternalStore
and capturing the current values together with the dependency tree of every component instance. However that isn't included in this pull request 1) it would be a breaking change, whereas the current change is still compatible with React 16 and 17. 2) I want to collect use cases where the tearing leads to problems first to build a better problem understanding. If you run into the problem, please submit an issue describing your scenario, and a PR with a unit tests demonstrating the problem in simplified form. For further discussion see #2526, #3005
59b42c28
#3282 Thanks @urugator! - supportobservable(forwardRef(fn))
, deprecateobservable(fn, { forwardRef: true })
, solve #2527, #3267
- Updated dependencies [
28f8a11d
]:
-
592e6e99
#2743 Thanks @vkrol! - RemovesideEffects
section inmobx-react-lite
package.json
-
Updated dependencies [
6b304232
,83b84fd3
,65c7b73b
,989390d4
,dea1cf18
,592e6e99
]:
-
Updated dependencies [
79a09f49
]:
-
01a050f7
Thanks @FredyC! - Fix use of react-dom vs react-nativeThe
es
folder content is compiled only without transpilation to keeputils/reactBatchedUpdates
which exists in DOM and RN versions. The bundledesm
is still kept around too, especially the prod/dev ones that should be utilized in modern browser environments.
81a2f865
Thanks @FredyC! - ESM bundles without NODE_ENV present are available in dist folder. This useful for consumption in browser environment that supports ESM Choose eitheresm.production.min.js
oresm.development.js
fromdist
folder.
a0e5fea
#329 Thanks @RoystonS! - exposeclearTimers
function to tidy up background timers, allowing test frameworks such as Jest to exit immediately
fafb136
#332 Thanks @Bnaya! - Introduce alternative way for managing cleanup of reactions. This is internal change and shouldn't affect functionality of the library.
570e8d5
#328 Thanks @mweststrate! - If observable data changed between mount and useEffect, the render reaction would incorrectly be disposed causing incorrect suspension of upstream computed values
Prior 3.0.0 see GitHub releases for changelog