-
Notifications
You must be signed in to change notification settings - Fork 49.3k
Move Built-in Props Types to React Types #32841
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
Conversation
Comparing: 31ecc98...bb01a3c Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
@@ -240,3 +235,78 @@ export type ReactTimeInfo = { | |||
export type ReactDebugInfo = Array< | |||
ReactComponentInfo | ReactEnvironmentInfo | ReactAsyncInfo | ReactTimeInfo, | |||
>; | |||
|
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 assume you're intentionally omitting LegacyHidden because deprecated, and doesn't need shared?
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.
Mainly I didn't see it implemented in Fizz originally. I see now that it's just part of the list of pass-throughs that just read children (along with Profiler) but we're not importing it into Fizz so was no reason to.
0e7a532
to
bb01a3c
Compare
Stacked on #32838. We don't always type the Props of built-ins. This adds typing for most of the built-ins. When we did type them, we used to put it in the `ReactFiber...Component` files but any public API like this can be implemented in other renderers too such as Fizz. So I moved them to `shared/ReactTypes` which is where we put other public API types (that are not already built-in to Flow). That way Fizz can import them and assert properly when it accesses the props. DiffTrain build for [c44e4a2](c44e4a2)
Stacked on #32838. We don't always type the Props of built-ins. This adds typing for most of the built-ins. When we did type them, we used to put it in the `ReactFiber...Component` files but any public API like this can be implemented in other renderers too such as Fizz. So I moved them to `shared/ReactTypes` which is where we put other public API types (that are not already built-in to Flow). That way Fizz can import them and assert properly when it accesses the props. DiffTrain build for [c44e4a2](c44e4a2)
Stacked on #32838.
We don't always type the Props of built-ins. This adds typing for most of the built-ins.
When we did type them, we used to put it in the
ReactFiber...Component
files but any public API like this can be implemented in other renderers too such as Fizz. So I moved them toshared/ReactTypes
which is where we put other public API types (that are not already built-in to Flow). That way Fizz can import them and assert properly when it accesses the props.