Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next release #3386

Merged
merged 1 commit into from
May 6, 2022
Merged

Next release #3386

merged 1 commit into from
May 6, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 2, 2022

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

mobx-react@7.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 Install mobx-react peer dependency error on react v18.0.0 #3363, Support concurrent features React / React 18 #2526. Supersedes [WIP] Support React 18 #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 Support concurrent features React / React 18 #2526, [WIP] Support React 18 #3005

Patch Changes

mobx-react-lite@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 Install mobx-react peer dependency error on react v18.0.0 #3363, Support concurrent features React / React 18 #2526. Supersedes [WIP] Support React 18 #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 Support concurrent features React / React 18 #2526, [WIP] Support React 18 #3005

@github-actions github-actions bot force-pushed the changeset-release/main branch from 1902a18 to 896ed80 Compare May 2, 2022 19:48
@github-actions github-actions bot force-pushed the changeset-release/main branch from 896ed80 to f68b2e9 Compare May 6, 2022 08:51
@mweststrate mweststrate merged commit 2e14aad into main May 6, 2022
@iChenLei iChenLei deleted the changeset-release/main branch May 6, 2022 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install mobx-react peer dependency error on react v18.0.0
1 participant