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 1400+ tech skills courses.