Passing the Props

Integration of the user and activeUserID into the Main as props so that we can access them later for display.

We'll cover the following

Let’s move on.

In App.js, retrieve the user and activeUserId from the store, like this:

const { contacts, user, activeUserId  } = store.getState();

What we had previously was this:

const { contacts } = store.getState();

Now, pass on these values as props to the <Main /> component.

<Main user={user} activeUserId={activeUserId} />

What we had previously was this:

<Main />

Now, let’s have the render logic fleshed out in <Main />

Before:

Get hands-on with 1200+ tech skills courses.