Skip to content

Latest commit

 

History

History
171 lines (91 loc) · 10.8 KB

CHANGELOG.md

File metadata and controls

171 lines (91 loc) · 10.8 KB

mobx-react-lite

4.0.4

Patch Changes

  • 3ceeb865 #3732 Thanks @urugator! - fix: #3734: isolateGlobalState: true makes observer stop to react to store changes

4.0.3

Patch Changes

  • 58bb052c #3670 Thanks @urugator! - fix #3669: SSR: useSyncExternalStore throws due to missing getServerSnapshot

4.0.2

Patch Changes

4.0.1

Patch Changes

4.0.0

Major Changes

  • 44a2cf42 #3590 Thanks @urugator! - Components now use useSyncExternalStore, which should prevent tearing - you have to update mobx, otherwise it should behave as previously.
    Improved displayName/name handling as discussed in #3438.

3.4.3

Patch Changes

3.4.2

Patch Changes

3.4.1

Patch Changes

3.4.0

Minor Changes

  • 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

3.3.0

Minor Changes

  • 59b42c28 #3282 Thanks @urugator! - support observable(forwardRef(fn)), deprecate observable(fn, { forwardRef: true }), solve #2527, #3267

3.2.3

Patch Changes

3.2.2

Patch Changes

3.2.1

Patch Changes

3.2.0

Patch Changes

  • Updated dependencies [28f8a11d]:
    • mobx@6.1.0

3.1.7

Patch Changes

3.1.6

Patch Changes

3.1.5

Patch Changes

  • 01a050f7 Thanks @FredyC! - Fix use of react-dom vs react-native

    The es folder content is compiled only without transpilation to keep utils/reactBatchedUpdates which exists in DOM and RN versions. The bundled esm is still kept around too, especially the prod/dev ones that should be utilized in modern browser environments.

3.1.4

Patch Changes

  • 8bbbc7c0 Thanks @FredyC! - Fix names of dist files (for real now). Third time is the charm 😅

3.1.3

Patch Changes

3.1.2

Patch Changes

3.1.1

Patch Changes

  • 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 either esm.production.min.js or esm.development.js from dist folder.

3.1.0

Minor Changes

  • a0e5fea #329 Thanks @RoystonS! - expose clearTimers function to tidy up background timers, allowing test frameworks such as Jest to exit immediately

Patch Changes

  • fafb136 #332 Thanks @Bnaya! - Introduce alternative way for managing cleanup of reactions. This is internal change and shouldn't affect functionality of the library.

3.0.1

Patch Changes

  • 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
  • 1d6f0a8 #326 Thanks @FredyC! - No important changes, just checking new setup for releases.

Prior 3.0.0 see GitHub releases for changelog