How it works...

As you can see, creating a new React Native application is very easy but there are some key differences between React (using JSX) and React Native using a special markup with object styles even there are some limitations on the styles as well, for example, let's create a flex layout:

    // Dependencies    import React, { Component } from 'react';    import { StyleSheet, Text, View } from 'react-native';    class Home extends Component {      render() {        return (          <View style={styles.container}>            <View style={styles.header}>              <Text style={styles.headerText}>Header</Text>            </View>            <View style={styles.columns}>              <View style={styles.column1}>                <Text style={styles.column1Text}>Column 1</Text>              </View>              <View style={styles.column2}>                <Text style={styles. ...

Get React Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.