September 2018
Intermediate to advanced
302 pages
7h 17m
English
The first important key is flexDirection. We can set it to row, row-reverse, column, or column-reverse. Flex direction makes content flow in that direction. By default in React Native, flex direction is set to column. That's why the boxes in the previous examples are displayed in a column.
Let's use flexDirection to display three small sections in the footer: Home, Search, and About:
// src / Chapter 3 / Example 9 / App.js...<View style={{ backgroundColor: 'steelblue', height: 70, flexDirection: 'row' }}> <View><Text style={{ fontSize: 40 }}>Home</Text></View> <View><Text style={{ fontSize: 40 }}>Search</Text></View> <View><Text style={{ fontSize: 40 }}>About</Text></View></View>...
Okay, we have three separate ...
Read now
Unlock full access