How to do it...

  1. We are going to be creating a fake Facebook timeline on the App class. Let's start by importing the dependencies, as follows:
import React from 'react';import {  Dimensions,  Image,  Text,  ScrollView,  StyleSheet,  SafeAreaView,} from 'react-native';import Reactions from './Reactions';
  1. We'll need to import some images to render in our timeline. The JSX in this step is very simple: it's just a toolbar, a ScrollView with two Image, and two Reaction components, as follows:
const image1 = require('./images/01.jpg');const image2 = require('./images/02.jpg');const { width } = Dimensions.get('window');const App = () => (  <SafeAreaView style={styles.main}>    <Text style={styles.toolbar}>Reactions</Text> <ScrollView style={styles.content}> ...

Get React Native Cookbook - Second Edition 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.