Recall & Review
beginner
What is the purpose of the <Text> component in React Native?
The <Text> component is used to display text on the screen in a React Native app. It can show simple or styled text and supports nesting other <Text> components.
Click to reveal answer
beginner
How do you apply styles to a <Text> component in React Native?
You apply styles by passing a style object or array to the style prop of the component, for example: Hello.
Click to reveal answer
intermediate
Can you nest <Text> components inside each other in React Native? Why?
Yes, nesting <Text> components is allowed and useful to apply different styles to parts of the text or to combine text with inline elements.
Click to reveal answer
intermediate
What accessibility feature should you consider when using <Text> components?
Use the accessibilityLabel prop to provide a descriptive label for screen readers, especially if the text is not clear or is an icon substitute.
Click to reveal answer
intermediate
How does the <Text> component handle long text that doesn't fit on one line?
By default, <Text> wraps text to the next line. You can control this with props like numberOfLines to limit lines or ellipsizeMode to show '...' when text is cut off.
Click to reveal answer
Which prop is used to style a <Text> component in React Native?
✗ Incorrect
The style prop is used to apply styles to React Native components, including .
What happens if you nest multiple <Text> components inside each other?
✗ Incorrect
Nesting components allows styling different parts of the text separately.
How do you limit a <Text> component to show only 2 lines of text?
✗ Incorrect
The numberOfLines prop limits how many lines the text can occupy.
Which prop helps screen readers understand the purpose of a <Text> component?
✗ Incorrect
accessibilityLabel provides a description for screen readers in React Native.
What is the default behavior of <Text> when the text is too long for one line?
✗ Incorrect
Explain how you would display a styled sentence with one word in bold using the component.
Think about putting a <Text> inside another <Text> and styling the inner one.
You got /3 concepts.
Describe how to make text accessible for screen readers in React Native using the component.
Consider what helps a screen reader understand what the text means.
You got /3 concepts.