1. 19
    Redux: React Todo List Example (Filtering Todos)
    8m 14s

Redux: React Todo List Example (Filtering Todos)

InstructorDan Abramov

Share this video with your friends

Send Tweet

Learn how to create a React todo list application using the reducers we wrote before.

Dor
~ 8 years ago

What would you say about passing an "IsSelected" boolean property instead of "currentFilter"? That way each component only needs to be aware of its "isSelected" status instead of being aware of which filter is currently active.

bradwoods.io
~ 8 years ago

Could you tell me what the reason is for not using 'React.createClass' when making react components?

Ben Polinsky
~ 8 years ago

Hi. It's considered okay practice for stateless/dumb (I know they're not exactly the same) components to call the store?

Kevin Pinny
~ 7 years ago

What would you say about passing an "IsSelected" boolean property instead of "currentFilter"? That way each component only needs to be aware of its "isSelected" status instead of being aware of which filter is currently active.

Dan is doing something similar in a lesson further down the road.

He seperated the UI logic from behaviour logic. What you describe with isSelected is perfect for a presentation component, but then behaviour around it (the filterLink) should be a container component (also because of the fact that filterLink is passed down multiple times without being used by other components)