O'Reilly logo

React Native Cookbook by Crysfel Villa, Stan Bershadskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting the store with the views

So far, we have set up the state, the middleware, and some actions to load data from hardcoded data and from a remote API. But we are not showing anything on screen; our react components don't have any access to the global state.

In this recipe we will enable components to access the store that we have defined, then we will render the categories on a list.

Getting ready

This recipe depends on all the previous ones; make sure to follow each recipe from the beginning.

On the first recipe of this chapter we installed the react-redux library. We are finally going to use it here. Make sure you have already installed it; otherwise, use npm or yarn to install it before going through the steps.

How to do it...

  1. We will start ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required