How to do it...

  1. Let's start by wiring the Redux store to the React Native app in App.js. We'll start with the imports, importing Provider from react-redux and the store we created earlier. We'll also import the Album component we'll be defining shortly, as follows:
import React, { Component } from 'react';import { StyleSheet, SafeAreaView } from 'react-native';import { Provider } from 'react-redux';import store from './redux';import Album from './components/Album';
  1. It's the job of e prop, where we'll pass in our Redux store. The app and th  Provider to connect our Redux store to the React Native app so that the app's components can communicate with the store. Provider should be used to wrap the entire app, and since this app lives in the  ...

Get React Native Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.