Skip to content

Commit 167ec92

Browse files
javachefacebook-github-bot
authored andcommitted
Consume ReactNativeAttributePayloadFabric from ReactNativePrivateInterface (#33616) (#52256)
Summary: Pull Request resolved: #52256 ## Summary ReactNativeAttributePayloadFabric was synced to react-native in 0e42d33. We should now consume these methods from the ReactNativePrivateInterface. Moving these methods to the React Native repo gives us more flexibility to experiment with new techniques for bridging and diffing props payloads. I did have to leave some stub implementations for existing unit tests, but moved all detailed tests to the React Native repo. ## How did you test this change? * `yarn prettier` * `yarn test ReactFabric-test` DiffTrain build for [7a3ffef70339c10f8d65a27b88cd73bfbe13eb8a](react/react@7a3ffef) Reviewed By: rubennorte Differential Revision: D77296286 fbshipit-source-id: a26aa0fe0f7f1c8a42407d759351734a4c85f970
1 parent 1348d7e commit 167ec92

3 files changed

Lines changed: 4 additions & 13 deletions

File tree

packages/react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @format
99
*/
1010

11-
import type {PartialAttributeConfiguration as AttributeConfiguration} from '../../Renderer/shims/ReactNativeTypes';
11+
import type {AttributeConfiguration} from '../../Renderer/shims/ReactNativeTypes';
1212

1313
import flattenStyle from '../../StyleSheet/flattenStyle';
1414
import deepDiffer from '../../Utilities/differ/deepDiffer';

packages/react-native/Libraries/ReactNative/ReactFabricPublicInstance/__tests__/ReactNativeAttributePayload-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
import type {PartialAttributeConfiguration as AttributeConfiguration} from '../../../Renderer/shims/ReactNativeTypes';
13+
import type {AttributeConfiguration} from '../../../Renderer/shims/ReactNativeTypes';
1414

1515
const {create, diff} = require('../ReactNativeAttributePayload');
1616

packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noformat
88
* @nolint
99
* @flow strict
10-
* @generated SignedSource<<4216c04f5a8c40a833b0146588fab5fa>>
10+
* @generated SignedSource<<6166de7ecbfb5d83e56c11a3b6cde9ba>>
1111
*/
1212

1313
import type {
@@ -35,15 +35,6 @@ export type AttributeType<T, V> =
3535
export type AnyAttributeType = AttributeType<$FlowFixMe, $FlowFixMe>;
3636

3737
export type AttributeConfiguration = $ReadOnly<{
38-
[propName: string]: AnyAttributeType,
39-
style: $ReadOnly<{
40-
[propName: string]: AnyAttributeType,
41-
...
42-
}>,
43-
...
44-
}>;
45-
46-
export type PartialAttributeConfiguration = $ReadOnly<{
4738
[propName: string]: AnyAttributeType,
4839
style?: $ReadOnly<{
4940
[propName: string]: AnyAttributeType,
@@ -84,7 +75,7 @@ export type PartialViewConfig = $ReadOnly<{
8475
directEventTypes?: ViewConfig['directEventTypes'],
8576
supportsRawText?: boolean,
8677
uiViewClassName: string,
87-
validAttributes?: PartialAttributeConfiguration,
78+
validAttributes?: AttributeConfiguration,
8879
}>;
8980

9081
type InspectorDataProps = $ReadOnly<{

0 commit comments

Comments
 (0)