The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

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

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

5:13
Learn how to write mapStateToProps() and mapDispatchToProps() functions and use connect() from React Redux library to generate container components.
Watch this lesson now
Avatar
egghead.io

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

Avatar
Sequoia McDowell

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. :)

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?