Build an Expense Manager App with React Native – Part 3

connect our containers to the Redux Store

We will user Redux’s connect() in our containers (screens) in order to make them connected to the Redux Store.

Example: show a loader when expenses are being fetched from the server, show an empty view if there none and show an error view if the API call fails. Edit MainScreen:

Now you can use conditional rendering to display certain components when a condition is meet. For example we show an Loader when the app is fetching expenses from the API. (this.state.isLoading = true)