Temporarily revert useSyncExternalStore
changes (#8785).
#9393
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.
We are considering an accelerated release schedule for Apollo Client v3.6, which will include low-risk/additive changes from
release-3.6
, while postponing experimental changes depending on React 18 (which has not been finalized) to the next minor release, v3.7. This PR represents the currentrelease-3.6
branch with PR #8785 reverted (see below for details). Specifically, this PR reverts commit 7f0d459 (#8785) and follow-up commit 5328dae.If/once this PR looks good (note: we can manually drop any changes we don't like), we can merge it into
release-3.6
, then create a newrelease-3.7
branch fromrelease-3.6
, and cherry-pick the inverse of this commit onto that new branch, effectively recreating theuseSyncExternalStore
work. This refactoring should allow us to continue releasing v3.6 betas without the risk/complexity introduced byuseSyncExternalStore
. We are still committed to implementing that API and fully supporting React 18, with prerelease availability continuing uninterrupted in the v3.7 betas.Now, because there have been several merges of
main
ontorelease-3.6
since those commits, and some of those merges involveuseSyncExternalStore
-related code, I was not able to obtain a good state simply by reverting the commits and manually resolving the conflicts.Instead, I removed the commits during an interactive Git rebase, using
--rebase-merges
to replay/recreate merge commits (rather than dropping them, as rebase usually does). Once I verified tests were passing after this rebase, I constructed the current commit from the difference between the branches, which should allow us to keep the current history from before the rebase, with this commit achieving the same final state as after the rebase.