React + Redux simplified | Part 2

Niroshan Kdt
2 min readFeb 16, 2020

--

In this post, we will learn how to get the stored tasks from the Redux store.

First, we will create a TodoItem component which will hold the atomic Todo task which will receive the text of the Todo task

Next, we will add a TodoList component which will have the above crated TodoItem andmaptStateToProps function. mapStateToProps function will map the stored state to todos then those todos will be used to iterate and get the individual todo object and pass the todo text to the TodoItem component.

Then finally add the created TodoList component to the App.js file.

Now you can see once you add a new todo task it will show below the text box. Yes, this is not the polished UI that’s because I wanted to show you the simplest version without adding much code because it will hard to understand the code.

The complete repository can be found here. Please checkout to the todo-list to see the changes up to this tutorial.

--

--