Recall & Review
beginner
What is the main component used to display text in a React Native app?
The
Text component is used to display text in React Native. It works like a label or paragraph in web pages.Click to reveal answer
beginner
How do you create a simple React Native component?
You create a function that returns JSX code. For example:<br><code>function Hello() { return <Text>Hi!</Text>; }</code>Click to reveal answer
beginner
What is the purpose of the
View component in React Native?The
View component is like a container or box. It groups other components and helps with layout and styling.Click to reveal answer
beginner
How do you run your first React Native app on a device or emulator?
You use the command
npx react-native run-android for Android or npx react-native run-ios for iOS after starting the Metro bundler.Click to reveal answer
beginner
Why do React Native apps use JSX syntax?
JSX lets you write UI code that looks like HTML but works in JavaScript. It makes building interfaces easier and clearer.
Click to reveal answer
Which React Native component is used to group other components and control layout?
✗ Incorrect
The
View component acts as a container to group and layout other components.What command starts the Metro bundler in a React Native project?
✗ Incorrect
The command
npx react-native start starts the Metro bundler which serves your app's JavaScript.In React Native, which syntax allows you to write UI code inside JavaScript?
✗ Incorrect
JSX is a syntax extension that lets you write UI code inside JavaScript.
Which component would you use to display a simple text message?
✗ Incorrect
The
Text component is designed to display text content.How do you run a React Native app on an Android emulator?
✗ Incorrect
Use
npx react-native run-android to build and run the app on an Android emulator.Describe the basic steps to create and run your first React Native app.
Think about writing UI code, starting the server, and launching the app.
You got /4 concepts.
Explain why JSX is helpful when building React Native apps.
Consider how writing UI code inside JavaScript helps developers.
You got /4 concepts.