1<Text style={styles.sampleStyle} >Something </Text>
2
3var styles = StyleSheet.create({
4 sampleStyle: {
5 textDecorationLine: "underline",
6 textDecorationStyle: "solid",
7 textDecorationColor: "#000"
8 }
9});
1// Some code....
2<Text
3 // Topic 2: Text Style
4 style={styles.headline}>Hi, Lunox!
5</Text>
6
7// Some code....
8
9headline: {
10 color: 'white', // <-- The magic
11 textAlign: 'center', // <-- The magic
12 fontWeight: 'bold',
13 fontSize: 50,
14 backgroundColor: 'purple',
15}
16// Some code....
17
18Look how I use it here:
19https://github.com/Lunox-code/100dayscode-react.native/blob/master/App.js