mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
[react-native] Consume ReactNativeAttributePayloadFabric from ReactNativePrivateInterface (#33616)
## Summary
ReactNativeAttributePayloadFabric was synced to react-native in
0e42d33cbc.
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`
This commit is contained in:
10
scripts/flow/react-native-host-hooks.js
vendored
10
scripts/flow/react-native-host-hooks.js
vendored
@@ -32,6 +32,7 @@ type __MeasureLayoutOnSuccessCallback = (
|
||||
type __ReactNativeBaseComponentViewConfig = any;
|
||||
type __ViewConfigGetter = any;
|
||||
type __ViewConfig = any;
|
||||
type __AttributeConfiguration = any;
|
||||
|
||||
// libdefs cannot actually import. This is supposed to be the type imported
|
||||
// from 'react-native-renderer/src/legacy-events/TopLevelEventTypes';
|
||||
@@ -203,6 +204,15 @@ declare module 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface'
|
||||
declare export function getInternalInstanceHandleFromPublicInstance(
|
||||
publicInstance: PublicInstance,
|
||||
): ?Object;
|
||||
declare export function createAttributePayload(
|
||||
props: Object,
|
||||
validAttributes: __AttributeConfiguration,
|
||||
): null | Object;
|
||||
declare export function diffAttributePayloads(
|
||||
prevProps: Object,
|
||||
nextProps: Object,
|
||||
validAttributes: __AttributeConfiguration,
|
||||
): null | Object;
|
||||
}
|
||||
|
||||
declare module 'react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore' {
|
||||
|
||||
Reference in New Issue
Block a user