mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Eliminate a few React.Element type that will be synced to react-native (#30719)
Summary: ## Summary Flow will eventually remove the specific `React.Element` type. For most of the code, it can be replaced with `React.MixedElement` or `React.Node`. When specific react elements are required, it needs to be replaced with either `React$Element` which will trigger a `internal-type` lint error that can be disabled project-wide, or use `ExactReactElement_DEPRECATED`. Fortunately in this case, this one can be replaced with just `React.MixedElement`. ## How did you test this change? `flow` DiffTrain build for commit https://github.com/facebook/react/commit/85fb95cdffdd95f2f908ee71974cae06b1c866e1. bypass-github-export-checks Reviewed By: poteto Differential Revision: D61397212 Pulled By: SamChou19815 fbshipit-source-id: c0aa5a4ed3922f88b7e557738f76f872c02a9d07
This commit is contained in:
committed by
Facebook GitHub Bot
parent
77154c64f0
commit
39c338ff8d
@@ -7,10 +7,15 @@
|
||||
* @noformat
|
||||
* @nolint
|
||||
* @flow strict
|
||||
* @generated SignedSource<<4405023a5d82ddc01db31d8eb46a7aa0>>
|
||||
* @generated SignedSource<<89361333bb6b688486e35849a9c669a6>>
|
||||
*/
|
||||
|
||||
import type {ElementRef, ElementType, Element, AbstractComponent} from 'react';
|
||||
import type {
|
||||
ElementRef,
|
||||
ElementType,
|
||||
MixedElement,
|
||||
AbstractComponent,
|
||||
} from 'react';
|
||||
|
||||
export type MeasureOnSuccessCallback = (
|
||||
x: number,
|
||||
@@ -222,7 +227,7 @@ export type ReactNativeType = {
|
||||
eventType: string,
|
||||
): void,
|
||||
render(
|
||||
element: Element<ElementType>,
|
||||
element: MixedElement,
|
||||
containerTag: number,
|
||||
callback: ?() => void,
|
||||
options: ?RenderRootOptions,
|
||||
@@ -257,7 +262,7 @@ export type ReactFabricType = {
|
||||
eventType: string,
|
||||
): void,
|
||||
render(
|
||||
element: Element<ElementType>,
|
||||
element: MixedElement,
|
||||
containerTag: number,
|
||||
callback: ?() => void,
|
||||
concurrentRoot: ?boolean,
|
||||
|
||||
@@ -7912,7 +7912,7 @@ export type ReactNativeType = {
|
||||
eventType: string
|
||||
): void,
|
||||
render(
|
||||
element: Element<ElementType>,
|
||||
element: MixedElement,
|
||||
containerTag: number,
|
||||
callback: ?() => void,
|
||||
options: ?RenderRootOptions
|
||||
@@ -7945,7 +7945,7 @@ export type ReactFabricType = {
|
||||
eventType: string
|
||||
): void,
|
||||
render(
|
||||
element: Element<ElementType>,
|
||||
element: MixedElement,
|
||||
containerTag: number,
|
||||
callback: ?() => void,
|
||||
concurrentRoot: ?boolean,
|
||||
|
||||
Reference in New Issue
Block a user