1. 27
    Redux: Generating Containers with connect() from React Redux (VisibleTodoList)
    5m 13s

Redux: Generating Containers with connect() from React Redux (VisibleTodoList)

InstructorDan Abramov

Share this video with your friends

Send Tweet

Learn how to write mapStateToProps() and mapDispatchToProps() functions and use connect() from React Redux library to generate container components.

Sequoia McDowell
~ 9 years ago

This is a curried function so it needs to be called twice

In fact the function (connect) isn't called twice, connect(mapStateToProps, mapDispatchToProps) returns a function, and you call that function with TodoList. The connect method is only called once.

Minor note but important for people just learning about higher order functions. :)