Lukasz
Dec 12, 2021

--

yep, but you have to change addTodo and completeTodo actions imports from "redux" to "redux-toolkit" ones (inside these components) ;) Anyway - nice article, thanks!

However there is one thing I can't understand:

in TodoList file there is:

const todos = useSelector(state => state.todo.todos)

of course - it works - but I can't get why there exists that "todo" object in the middle? Why it is not just state.todos? :) Interesting, have to check it later :D

--

--

Responses (1)