-
Notifications
You must be signed in to change notification settings - Fork 49.7k
[DevTools] Wrap each tab in <Activity> if available
#34426
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
base: main
Are you sure you want to change the base?
[DevTools] Wrap each tab in <Activity> if available
#34426
Conversation
8279ea6 to
24c70b7
Compare
| import type {SourceSelection} from './Editor/EditorPane'; | ||
|
|
||
| const MaybeActivity = | ||
| React.unstable_Activity || |
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.
If we need to disable <Activity> usage, we should just remove this branch and keep StrictMode usage in.
24c70b7 to
6086b2b
Compare
6086b2b to
f42ea4a
Compare
| import type {ReactFunctionLocation, ReactCallSite} from 'shared/ReactTypes'; | ||
| import type {SourceSelection} from './Editor/EditorPane'; | ||
|
|
||
| const MaybeActivity: any = |
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.
I don't know how to type this. Flow treats React.Activity as a Symbol not a ElementType with certain props.
|
|
||
| function HookTreeCase() { | ||
| const onClick = useCustomHook(); | ||
| const [, , onClick] = useCustomHook(); |
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.
drive-by fix for noisy shell errors.
The divs are already
hidden={true}so we can tell React to deprioritize the hidden tabs. That way Suspense related effects like auto-scroll and suspense auto-selection don't apply while using the Components tab.I also introduced
StrictModeinto the DevTools tree to find potential issues.