react/packages/react-native-renderer/src/__mocks__/react-native/Libraries/ReactPrivate
Rubén Norte 0700dd50bd
Implement public instances for text nodes in Fabric (#26516)
## Summary

This adds the ability to create public instances for text nodes in
Fabric. The implementation for the public instances lives in React
Native (as it does for host components after #26437). The logic here
just handles their lazy instantiation when requested via
`getPublicInstanceFromInternalInstanceHandle`, which is called by Fabric
with information coming from the shadow tree.

It's important that the creation of public instances for text nodes is
done lazily to avoid regressing memory usage when unused. Instances for
text nodes are left intact if the public instance is never accessed.

This is necessary to implement access to text nodes in React Native as
explained in
https://github.com/react-native-community/discussions-and-proposals/pull/607

## How did you test this change?

Added unit tests (also fixed a test that was only testing the logic in a
mock :S).
2023-04-04 14:43:35 +01:00
..
BatchedBridge.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
ExceptionsManager.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
InitializeNativeFabricUIManager.js Implement unstable_getBoundingClientRect in RN Fabric refs (#26137) 2023-02-09 18:51:47 +00:00
Platform.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
RCTEventEmitter.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
RawEventEmitter.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
ReactFiberErrorDialog.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
ReactNativePrivateInitializeCore.js Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
ReactNativePrivateInterface.js Implement public instances for text nodes in Fabric (#26516) 2023-04-04 14:43:35 +01:00
ReactNativeViewConfigRegistry.js Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
TextInputState.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
UIManager.js Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
createPublicInstance.js Remove ReactFabricPublicInstance and used definition from ReactNativePrivateInterface (#26437) 2023-03-22 17:54:36 +00:00
createPublicTextInstance.js Implement public instances for text nodes in Fabric (#26516) 2023-04-04 14:43:35 +01:00
deepDiffer.js Avoid meta programming to initialize functions in module scope (#26388) 2023-03-14 21:00:22 -04:00
deepFreezeAndThrowOnMutationInDev.js Avoid meta programming to initialize functions in module scope (#26388) 2023-03-14 21:00:22 -04:00
flattenStyle.js Avoid meta programming to initialize functions in module scope (#26388) 2023-03-14 21:00:22 -04:00
getNativeTagFromPublicInstance.js Remove ReactFabricPublicInstance and used definition from ReactNativePrivateInterface (#26437) 2023-03-22 17:54:36 +00:00
getNodeFromPublicInstance.js Remove ReactFabricPublicInstance and used definition from ReactNativePrivateInterface (#26437) 2023-03-22 17:54:36 +00:00
legacySendAccessibilityEvent.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00