Creating the entry point
The index
file found at app/index.js
will serve as the entry point into our application. Both the iOS and Android versions of Tasks
will call upon it, and it's going to set up our Redux architecture. First, we'll import all the necessary dependencies. Don't worry if we haven't created any applicable files or folders for these items yet; we'll do so very shortly:
// TasksRedux/app/index.js import React from 'react'; import AppContainer from './containers/AppContainer'; import { createStore, applyMiddleware } from 'redux'; import { Provider } from 'react-redux'; import thunk from 'redux-thunk'; import listOfTasks from './reducers';
Next, let's set up our store.
Setting up our store
To set up our store, we will need to use Redux's createStore
method and then pass it a reducer. Here's how it looks on a high level:
let store = createStore(task)
Additionally, since we know we'll be dealing with asynchronous calls in our...