- Let's start by opening up App.js and adding the dependencies we'll need:
import React, { Component } from 'react';import { Audio } from 'expo';import { Feather } from '@expo/vector-icons';import { StyleSheet, Text, TouchableOpacity, View, Dimensions} from 'react-native';
- An audio player needs audio to play. We'll create a playlist array to hold the audio tracks. Each track is represented by an object with a title, artist, album, and uri:
const playlist = [ { title: 'People Watching', artist: 'Keller Williams', album: 'Keller Williams Live at The Westcott Theater on 2012-09-22', uri: 'https://ia800308.us.archive.org/7/items/kwilliams2012-09-22.at853.flac16/kwilliams2012-09-22at853.t16.mp3' }, { title: 'Hunted By A Freak', ...