Snyk has created this PR to upgrade mobx-react from 7.4.0 to 7.5.0.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 1 version ahead of your current version.
The recommended version was released 21 days ago, on 2022-05-23.
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
Snyk has created this PR to upgrade mobx-react from 7.4.0 to 7.5.0.
Release notes
Package name: mobx-react
Minor Changes
1470b8e4
#3404 Thanks @ pixelkritzel! -this.context
is observable if static contextType is setMinor Changes
4c5e75cd
#3382 Thanks @ iChenLei! - replace the deprecated react type definition with recommended type definitionbd4b70d8
#3387 Thanks @ mweststrate! - Added experimental / poor man's support for React 18. Fixes #3363, #2526. Supersedes #3005useMutableSource
will trigger warnings in React 18, which is correct and those shouldn't be used anymore.act
is used in unit tests around every programmatic mutation. Without it, changes won't propagate!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, #3005Patch Changes
4c5e75cd
,bd4b70d8
]:Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:![](https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiIxMDk2Yzk3My00MjNiLTRjM2UtYTUwYS1jNTIzZmYzYjg2MjkiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjEwOTZjOTczLTQyM2ItNGMzZS1hNTBhLWM1MjNmZjNiODYyOSJ9fQ==)
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs