From 90a9d59679bb955cc509938d5ef95f29346debbc Mon Sep 17 00:00:00 2001 From: Rick Hanlon Date: Wed, 9 Oct 2019 09:33:49 -0700 Subject: [PATCH] Partial React Sync Summary: This diff is a partial sync of React into React Native. ## Source The source branch is from my fork [here](https://github.com/facebook/react/compare/master...rickhanlonii:react-native-partial-sync-october-9?expand=1) This branch is created from D17456249 which partially synced Dan's branch [here](https://github.com/facebook/react/compare/master...gaearon:partsync). To create my branch, I forked from Dan's branch and added two commits from these PRs: - Joshua's PR to improve view config errors https://github.com/facebook/react/pull/16879 - Eli's PR to remove setNativeProps warning https://github.com/facebook/react/pull/17045 Reviewed By: gaearon Differential Revision: D17828989 fbshipit-source-id: 75c99737f2dec4889d7d453bbdebaeb47656b5ce --- .../ReactNativeTypes-flowtest.js | 4 +- .../implementations/ReactFabric-dev.fb.js | 35 +-------- .../implementations/ReactFabric-dev.js | 35 +-------- .../implementations/ReactFabric-prod.fb.js | 1 - .../implementations/ReactFabric-prod.js | 1 - .../ReactFabric-profiling.fb.js | 1 - .../implementations/ReactFabric-profiling.js | 1 - .../ReactNativeRenderer-dev.fb.js | 71 ++----------------- .../ReactNativeRenderer-dev.js | 71 ++----------------- .../ReactNativeRenderer-prod.fb.js | 15 ---- .../ReactNativeRenderer-prod.js | 15 ---- .../ReactNativeRenderer-profiling.fb.js | 15 ---- .../ReactNativeRenderer-profiling.js | 15 ---- Libraries/Renderer/shims/ReactNativeTypes.js | 4 +- 14 files changed, 15 insertions(+), 269 deletions(-) diff --git a/Libraries/Renderer/__flowtests__/ReactNativeTypes-flowtest.js b/Libraries/Renderer/__flowtests__/ReactNativeTypes-flowtest.js index f69add675f3..38271928399 100644 --- a/Libraries/Renderer/__flowtests__/ReactNativeTypes-flowtest.js +++ b/Libraries/Renderer/__flowtests__/ReactNativeTypes-flowtest.js @@ -13,7 +13,7 @@ import * as React from 'react'; import type { HostComponent, - ReactNativeComponentClass_ForTestsOnly, + _InternalReactNativeComponentClass, } from '../shims/ReactNativeTypes'; function takesHostComponentInstance( @@ -34,7 +34,7 @@ const MyHostComponent = (('Host': any): HostComponent); }} />; -declare var NativeComponent: ReactNativeComponentClass_ForTestsOnly<{}>; +declare var NativeComponent: _InternalReactNativeComponentClass<{}>; class MyNativeComponent extends NativeComponent {} extends React.Component { } // This type is only used for FlowTests. It shouldn't be imported directly -export type ReactNativeComponentClass_ForTestsOnly = Class< +export type _InternalReactNativeComponentClass = Class< ReactNativeComponent, >; @@ -144,7 +144,6 @@ export type ReactNativeType = { NativeComponent: typeof ReactNativeComponent, findNodeHandle(componentOrHandle: any): ?number, dispatchCommand(handle: any, command: string, args: Array): void, - setNativeProps(handle: any, nativeProps: Object): void, render( element: React$Element, containerTag: any, @@ -161,7 +160,6 @@ export type ReactFabricType = { NativeComponent: typeof ReactNativeComponent, findNodeHandle(componentOrHandle: any): ?number, dispatchCommand(handle: any, command: string, args: Array): void, - setNativeProps(handle: any, nativeProps: Object): void, render( element: React$Element, containerTag: any,