Complete the code to import SafeAreaView from React Native.
import { [1] } from 'react-native';
You need to import SafeAreaView to use it in your component.
Complete the code to wrap content inside SafeAreaView.
export default function App() {
return (
<[1]>
<Text>Hello!</Text>
</[1]>
);
}Use SafeAreaView to ensure content is inside safe screen boundaries.
Fix the error in the SafeAreaView usage by completing the code.
import { SafeAreaView, Text } from 'react-native'; export default function App() { return ( <SafeAreaView [1]> <Text>Welcome!</Text> </SafeAreaView> ); }
The correct way to make SafeAreaView fill the screen is to pass style={{flex: 1}}.
Fill both blanks to create a SafeAreaView with a blue background and centered text.
import { SafeAreaView, Text, StyleSheet } from 'react-native'; const styles = StyleSheet.create({ container: { [1]: 1, backgroundColor: '[2]', justifyContent: 'center', alignItems: 'center' } });
Use flex: 1 to fill space and backgroundColor: 'blue' for blue background.
Fill all three blanks to create a SafeAreaView with padding, white background, and a Text component with large font size.
import { SafeAreaView, Text, StyleSheet } from 'react-native'; const styles = StyleSheet.create({ container: { [1]: 20, backgroundColor: '[2]' }, text: { fontSize: [3] } });
Use padding: 20 for spacing inside, backgroundColor: 'white' for white background, and fontSize: 24 for large text.