react-native-optimizer
react-native-optimizer copied to clipboard
Prevent `<Text />` `numberOfLines` optimization bailout
The numberOfLines prop will cause the Text -> NativeText optimization to bail out. We should map numberOfLines={numberOfLines} to numberOfLines={Math.ceil(0, numberOfLines)} and remove numberOfLines from the Text -> NativeText bail out rules. We move the warning to the build step.
https://github.com/facebook/react-native/blob/441822923c9509dbb28bceacf6fc590c157e15bb/packages/react-native/Libraries/Text/Text.js#L198C7-L204