react/scripts/flow
Pieter De Baets 151e75a128
[Fabric] Pass children when cloning (#27458)
## Summary

Currently when cloning nodes in Fabric, we reset a node's children on
each clone, and then repeatedly call appendChild to restore the previous
list of children (even if it was quasi-identical to before). This causes
unnecessary invalidation of the layout state in Fabric's ShadowNode data
(which in turn may require additional yoga clones) and extra JSI calls.

This PR adds a feature flag to pass in the children as part of the clone
call, so Fabric always has a complete view of the node that's being
mutated.

This feature flag requires matching changes in the react-native repo:
https://github.com/facebook/react-native/pull/39817

## How did you test this change?

Unit test added demonstrates the new behaviour 

```
yarn test -r www-modern ReactFabric-test
yarn test ReactFabric-test.internal
```

Tested a manual sync into React Native and verified core surfaces render
correctly.
2023-10-10 15:11:26 +01:00
..
config Upgrade to Flow 0.217.0 (#27407) 2023-09-22 11:40:36 -04:00
createFlowConfigs.js Updating forking implementation to match against more general fork implementations (#27205) 2023-08-17 15:17:46 -07:00
environment.js [Flight] Taint APIs (#27445) 2023-10-02 13:55:39 -04:00
react-devtools.js ESLint upgrade to use hermes-eslint (#25915) 2022-12-20 14:27:01 -05:00
react-native-host-hooks.js [Fabric] Pass children when cloning (#27458) 2023-10-10 15:11:26 +01:00
runFlow.js Upgrade prettier (#26081) 2023-01-31 08:25:05 -05:00
xplat.js [Fabric] Pass children when cloning (#27458) 2023-10-10 15:11:26 +01:00