Learn how to create a React todo list application using the reducers we wrote before.
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.
Could you tell me what the reason is for not using 'React.createClass' when making react components?
Hi. It's considered okay practice for stateless/dumb (I know they're not exactly the same) components to call the store?
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)