Nesting View components inside Text components not working correctly 0.60-RC
See original GitHub issueReact Native version: System: OS: macOS High Sierra 10.13.6 CPU: (4) x64 Intel® Core™ i5-4278U CPU @ 2.60GHz Memory: 3.11 GB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.9.0 - /usr/local/bin/node npm: 6.9.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 Android SDK: API Levels: 23, 26, 28 Build Tools: 23.0.1, 26.0.3, 27.0.3, 28.0.2 System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.1 AI-173.4907809 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.0-rc.0 => 0.60.0-rc.0 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-cli: 2.0.1
The following code produces the issue. Keep in minde that the example is simplified as much as possible and would not make sense to use anywhere in your project in this exact way.
<Text>
<View>
<Text>Hello world!</Text>
</View>
</Text>
The code above does not display anything on the screen. Tested on 0.60RC0 and 0.60RC1, still does not work.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
@kelset
think it’s this one 😇 https://github.com/facebook/react-native/pull/23195/commits/b6c65e4bba6306bec18c5e6111dde56a070817d5#diff-b9097bc72809ab84057ff8a0b1e0cce0R134
This: https://github.com/facebook/react-native/issues/25197#issuecomment-503028405 is exactly what is happening when I try this out.
https://github.com/facebook/react-native/commit/a2a03bc68ba062a96a6971d3791d291f49794dfd lists some known bug but it does not say anything about the issue described in https://github.com/facebook/react-native/issues/25197#issuecomment-503028405.
Should the ability to nest View components inside Text even be added in 0.60 at this stage? Especially if there are known bugs like these:
I think a lot of people are going to get hung up on this stuff.
Thank you guys for the hard work it’s really appreciated!
cc: @kelset