-
Notifications
You must be signed in to change notification settings - Fork 50k
Add SuspenseList to devTools #19684
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
Add SuspenseList to devTools #19684
Changes from 5 commits
2913d25
ee14dde
e643a66
8eea855
c58d7f1
2362d17
62144f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ import { | |
| REACT_PROVIDER_TYPE, | ||
| REACT_STRICT_MODE_TYPE, | ||
| REACT_SUSPENSE_TYPE, | ||
| REACT_SUSPENSE_LIST_TYPE, | ||
| } from 'shared/ReactSymbols'; | ||
| import isValidElementType from 'shared/isValidElementType'; | ||
|
|
||
|
|
@@ -36,6 +37,7 @@ export function typeOf(object: any) { | |
| case REACT_PROFILER_TYPE: | ||
| case REACT_STRICT_MODE_TYPE: | ||
| case REACT_SUSPENSE_TYPE: | ||
| case REACT_SUSPENSE_LIST_TYPE: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we still need this change?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think so; without it typeOf will not recognize a SuspenseList and will cause getDisplayNameForReactElement to return "NotImplementedInDevtools" instead of "SuspenseList" |
||
| return type; | ||
| default: | ||
| const $$typeofType = type && type.$$typeof; | ||
|
|
||
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.
Why not import React and test actual elements here and below?
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.
Ok!