Answer the question
In order to leave comments, you need to log in
Why assign connect to a component?
I found this code in the examples, what does it mean?
I understand that mapStateToProps, mapDispatchToProps pass data to TodoList, but why assign it to VisibleTodoList?
link to source
const VisibleTodoList = connect(
mapStateToProps,
mapDispatchToProps
)(TodoList)
export default VisibleTodoList
connect(
null,
mapDispatchToProps
)(TodoList)
connect(
mapStateToProps,
mapDispatchToProps
)(Todo)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question