-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Better React 18 support #3590
Merged
Merged
Better React 18 support #3590
Changes from 36 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
223ce6b
wip
urugator fbe7604
wip
urugator 6976dec
wip
urugator 08ab24d
wip
urugator 951b7e8
fix test
urugator abfaa7e
wip
urugator b5c26ca
refactor
urugator dfb75fd
refactor
urugator 5006263
refactors
urugator 229fc05
refactors
urugator 5ca1cfe
refactor
urugator fa05836
use useSyncExternalStore shim
urugator 8b8d948
typo
urugator 27560d4
refactor
urugator 09e471a
Merge remote-tracking branch 'upstream/main' into use-external-sync-s…
urugator dba0d23
useObserver: handle re-render without reaction
urugator 2316e04
disposeOnUnmount jsdoc decprecation msg
urugator dd52381
disposeOnUnmount refactor
urugator df38953
Merge remote-tracking branch 'upstream/main' into use-external-sync-s…
urugator 9e09fab
cleanup
urugator f239cb4
improve displayName/name handling
urugator c1f375a
fix mobx-react test
urugator c0ececc
try provide GC bit more time
urugator 829dab9
try lower GC time
urugator 0ba9985
bit more perhpas?
urugator 8c09317
300ms
urugator e5492e6
document magic number
urugator b250f58
use number instead of Symbol as stateVersion
urugator e6c6246
GC 300ms -> 500ms
urugator b41d71e
Merge remote-tracking branch 'upstream/main' into use-external-sync-s…
urugator b963f7a
fix api test
urugator 344c2cf
move use-sync-external-store to dev deps
urugator 98940ad
changeset
urugator 4ebb124
bump deps
urugator 1c7e16c
deps?
urugator 4b138b5
deps?
urugator 21a7590
add new lines to changeset
urugator 91e6c1a
remove test
urugator 26fe732
Merge remote-tracking branch 'upstream/main' into use-external-sync-s…
urugator 12ef4cc
improve comment
urugator 98cde8b
make finalization regsitry test bit more robust
urugator e55c51c
increase timeout
urugator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"mobx": minor | ||
--- | ||
|
||
Better support for React 18: Mobx now keeps track of a global state version, which updates with each mutation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"mobx-react-lite": major | ||
--- | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
"mobx-react": major | ||
--- | ||
|
||
Functional components now use `useSyncExternalStore`, which should prevent tearing - you have to update mobx, otherwise it should behave as previously. | ||
Improved displayName/name handling of functional components as discussed in #3438. | ||
Reactions of uncommited class components are now correctly disposed, fixes #3492. | ||
Reactions don't notify uncommited class components, avoiding the warning, fixes #3492. | ||
Removed symbol "polyfill" and replaced with actual Symbols. | ||
Removed `this.render` replacement detection + warning. `this.render` is no longer configurable/writable (possibly BC). | ||
Class component instance is no longer exposed as `component[$mobx]["reactcomponent"]` (possibly BC). | ||
Deprecated `disposeOnUnmount`, it's not compatible with remounting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was not supposed to warn. Warning was caused by calling
disableStaticRendering
beforeunmount
in the test. ThereforecomponentWillUnmount
used logic for non-static rendering.