Explore Library
Code QuizBeginner

Nesting Text Components

Spot why a bare string next to a nested Text triggers a runtime error in React Native.

Codejavascript
function Greeting({ name }) {
  return (
    <View style={styles.row}>
      Hello, <Text style={styles.bold}>{name}</Text>!
    </View>
  );
}

This component crashes with 'Text strings must be rendered within a <Text> component'. What is the bug?