React Native - Text




React Native - Text

React Native's Text component will be discussed in this chapter.

A nested component can inherit properties from its parent. This is useful in many ways. We will show you examples of capitalizing the first letter, styling words, etc.

Step 1: Create File

The file we are going to create is text_example.js

Step 2: App.js

In this step, we will just create a simple container.

App.js

React Native - Text

Step 3: Text

This step uses the inheritance pattern. styles.text will be applied to all Text components.

It's also important to know that all child elements inherit parent styles from their parents.

text_example.js

React Native - Text

React Native - Text

React Native - Text

You will receive the following output −

React Native - Text



Frequently Asked Questions

+
Ans: React Native - Picker view more..
+
Ans: React Native - ActivityIndicator view more..
+
Ans: React Native - Modal view more..
+
Ans: React Native - Text view more..
+
Ans: React Native - Alert view more..




Rating - NAN/5
537 views

Advertisements