-
Notifications
You must be signed in to change notification settings - Fork 49.8k
[Fiber] Child Reconciliation, Refs and Life-Cycles #7707
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d9393ee
Add Fragment fiber type
sebmarkbage e8c1cb4
Add Text node types
sebmarkbage d7322d8
Silence Fiber warning when the feature flag is on
sebmarkbage e05ab67
Fix MultiChild tests so they work with Fiber
sebmarkbage 8c7409b
Add comment about bug in yields
sebmarkbage 4ed67f1
Enable text updates in ReactNoop
sebmarkbage dff0faf
Fiber child reconciliation
sebmarkbage 51f2bf9
Add index field to each fiber
sebmarkbage bcbceae
Don't track side-effects unless needed
sebmarkbage c49a91c
Fast path for create child
sebmarkbage be0acf8
Deletion tracking
sebmarkbage 76725fe
Tag the fiber with the kind of side-effect that was applied to it
sebmarkbage 86e854e
Append deletions to the effect list
sebmarkbage eabed69
Move child updates to use the reconciled effects
sebmarkbage 31ca1e7
Remove beginWork shortcut
sebmarkbage 0262e70
Reset effect list when we recompute children
sebmarkbage f3d7116
Always override priority level when visiting children
sebmarkbage 40989f8
Call componentWillUnmount during deletion phase
sebmarkbage 8360088
Fire componentDidMount/componentDidUpdate life-cycles
sebmarkbage 48cf81c
Resolve ref callbacks
sebmarkbage 8721ec1
Invoke all null ref calls before any new ref calls
sebmarkbage d9efde7
Fix resuming bug
sebmarkbage 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
Add index field to each fiber
We use this to track the index slot that this Fiber had at reconciliation time. We will use this for two purposes: 1) We use it to quickly determine if a move is needed. 2) We also use it to model a sparce linked list, since we can have null/false/undefined in our child set and these take up a slot for the implicit key.
- Loading branch information
commit 51f2bf998a8e3841a6d709595dd93809df9d2f8f
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
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.
Nit: could write this as
expect(instanceC).toBe(instanceA)?Uh oh!
There was an error while loading. Please reload this page.
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.
Actually I can't be cause when it errors that stalls
jesttrying to print the error presumably. I spent some time trying to figure out why but the debugger doesn't work on it. My best bet is that a message simply gets dropped which stalls the process waiting for a response that never arrives. cc @cpojerThere 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.
That's not good. Would you mind opening an issue about this on Jest's bugtracker?
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.
jestjs/jest#1772 (comment)