Search⌘ K

Passing the Props

Understand how to retrieve and pass user and active user ID as props within a Redux-managed React app. Learn to render dynamic content based on state, enabling views like empty screens or chat windows depending on active users.

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 ...