Grokking React Native
Vote

0% completed

​

Understanding Flexbox for Layout

Three boxes placed inside a View stack from top to bottom, even though no style asks for that. The reason is that every View in React Native already uses a layout system called Flexbox, and its default direction is vertical. To see this, add a row of statistics to Ana's profile: her posts, her followers, and the people she follows.

import { StyleSheet, Text, View } from 'react-native'; const App = () => { return ( <View style={styles.container}> <View style={styles.box}><Text>Posts</Text></View> <View style={styles.box}><Text>Followers</Text></View>

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content