Explore Library
Code QuizAdvanced

Text Inside a View

Spot the common mistake when rendering text in React Native.

Codejavascript
import React from 'react';
import { View, StyleSheet } from 'react-native';

export default function Greeting() {
  return (
    <View style={styles.container}>
      Hello, React Native!
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
});

What is the bug in this code?