-
Notifications
You must be signed in to change notification settings - Fork 26.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
suspend in render, not in reducers #56497
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
95f6575
(wip) don't suspend in reducers
ztanner 7caa298
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner e4b63d6
rm log
ztanner 2f01913
debug
ztanner d6e699c
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 245edbc
sequencing logic
ztanner 1cc15fa
test
ztanner 0010b84
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 4a2a9c0
lint imports
ztanner 13f7a01
tweak
ztanner 2376810
test tweak
ztanner d669590
revert test changes
ztanner 7398933
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 3235239
another test tweak
ztanner 4eea5cf
first pass at a queue
ztanner 9f47f6f
cleanup
ztanner e4d7c2d
move some things around
ztanner 7182bc5
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 14f808e
lint
ztanner f5a7bbb
create mutable in hydrate
ztanner 6061836
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 29ae730
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 3091bdc
improve queue appending logic
ztanner 4a847e2
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 4d86fc7
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner a6d573b
call setState immediately when action is dispatched
ztanner 2fbd126
rename for clarity
ztanner 651db2a
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 117d9bf
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 1a59742
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner eb7a6a7
re-arrange some things
ztanner dcfc92b
Remove ! as the type is inferred correctly
timneutkens 7aab590
remove withResolvers in place of using a promise constructor
ztanner 8e0c0d1
re-add isThenable typeguard
ztanner 2b145c1
add action discarding for navigation events
ztanner ec8a37e
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 2966f85
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 00660cf
refresh + test
ztanner d3f199d
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner 94f6bb2
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner de848d0
Merge branch 'canary' into feat/remove-suspending-reducers
ztanner a41dbd7
pr comments
ztanner 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
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
28 changes: 0 additions & 28 deletions
28
packages/next/src/client/components/router-reducer/read-record-value.test.ts
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
packages/next/src/client/components/router-reducer/read-record-value.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
What's in this initial state that can't be created before render, at the same time that the queue is created?
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.
This relies on data that is streamed in from app-render (such as the initial tree) and I wasn't seeing how we could easily access that data during hydration.
cc @timneutkens in case you have any ideas here, this was the thing we chatted about last week
EDIT: We'll see about doing this in a follow-up, as the changes are a bit more involved and don't necessarily need to block this