- 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';
- 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}> ...