From the course: Building Modern Projects with React

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Combining selectors with Reselect

Combining selectors with Reselect

From the course: Building Modern Projects with React

Start my 1-month free trial

Combining selectors with Reselect

- [Instructor] Previously, we saw that selectors can help our components be independent of the exact structure of data in our Redux store. Now, it's time to take a look at their second purpose, to give us a place to put the logic necessary for transforming bare Redux data into more specific data that our components might need. In order to make this example more effective, let's say that we're going to make a change to our application. Instead of having a single to-do list that displays all of our to dos, let's say that we're going to change our application so that we have two separate lists, one to display the completed to dos and one to display the to dos that we haven't completed yet. Now, this change requires us to perform a little bit of logic to transform the data contained in our Redux store, which simply contains a list of all our to do items, into lists of our completed or incomplete to dos. Now, our first instinct…

Contents