The example there suggests wrapping each Text with TouchableOpacity. Also the texts themselves aren't actually nested, but the TouchableOpacitys are.
It's quite common in React Native to nest the texts themselves (usually to inherit the styling from the outer Text). A common use-case here is to add onPress to the text itself, rather than wrapping in a button. Like this:
If I try this, only the overall text is shown as something accessible
Should this work? Is this a react native issue, or a maestro issue?
My problems with the example in the docs are that:
The text isn't actually nested (no style inheritance)
If you wrap the inner text with a TouchableOpacity, it breaks styling because of spacing React Native adds
I've seen the guidance on nested text here.
The example there suggests wrapping each
Text
withTouchableOpacity
. Also the texts themselves aren't actually nested, but theTouchableOpacity
s are.It's quite common in React Native to nest the texts themselves (usually to inherit the styling from the outer Text). A common use-case here is to add
onPress
to the text itself, rather than wrapping in a button. Like this:If I try this, only the overall text is shown as something accessible
Should this work? Is this a react native issue, or a maestro issue?
My problems with the example in the docs are that: