Passing the Sidebar data via Props

In order to render our contacts in the Sidebar, we need to send these contacts as props and then turn them into an array for iteration, using lodash.

We'll cover the following

If you take a look at the entire code now, you’ll agree that the entry point of the app remains index.js

Index.js then renders the App component. The App component is then responsible for rendering the Main and Sidebar components.

For Sidebar to have access to the required contacts data, we’ll pass in the data via props.

In App.js, retrieve contacts from the store, and pass it on to Sidebar like this:


Get hands-on with 1200+ tech skills courses.