This repository was archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Update constants and support React.lazy #1103
Merged
Conversation
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
gaearon
commented
Aug 20, 2018
| case ClassComponentLazy: | ||
| nodeType = 'Composite'; | ||
| name = getDisplayName(fiber.type); | ||
| name = getDisplayName(resolvedType); |
Contributor
Author
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.
These shouldn't appear in the tree before type is resolved. So I'm assuming it is here.
gaearon
commented
Aug 20, 2018
| children = []; | ||
| break; | ||
| case ForwardRef: | ||
| case ForwardRefLazy: |
Contributor
Author
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.
It was more convenient to use tag than $$typeof here.
bvaughn
approved these changes
Aug 20, 2018
Contributor
bvaughn
left a comment
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.
Looks okay. Did not test.
Contributor
Author
|
I didn't test extensively (especially with old React). But we'll test it at least a bit anyway before next release. |
OrDuan
pushed a commit
to OrDuan/react-devtools
that referenced
this pull request
Aug 23, 2018
* Update constants to match facebook/react#13444 * Update constants and support Lazy * Fix lint
2 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Updates constants to facebook/react#13444 and adds support for lazy types.
You need to update
ReactVersionin local bundle and enable suspense to test these.