[Fabric] Add `flex: 1` to Offscreen view container (#22019)
Without this style property, the layout of the children is messed up. The goal is for the container view to have no layout at all. It should be a completely transparent wrapper, except for when we set `display: none` to hide its contents. On the web, the equivalent (at least in the spec) is `display: contents`. After some initial testing, this seems to be close enough to the desired behavior that we can ship it. We'll try rolling it out behind a flag.
Andrew Clark committed
Aug 3, 2021 at 22:26 UTC
215db465a228955cfbb9d51cc68ed9390bfc353a
1 file changed
+3
packages/react-native-renderer/src/ReactFabricHostConfig.js
+3
@@ -453,6 +453,9 @@ export function getOffscreenContainerProps(
453
} else {
454
return {
455
children,
456
+ style: {
457
+ flex: 1,
458
+ },
459
};
460
}
461
}