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

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

Dan Abramov
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
Sequoia McDowell
~ 5 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. :)

Ferdinand
Ferdinand
~ 4 years ago

The last 10 videos have been a bit of a waste of time. Why not just pick out the Provider tutorial and then just jump to these connect classes. It has been a very mess path to get here!

And what's with dumping everything into a single file - such a messy way of writing application code.

Alfonso Rush
Alfonso Rush
~ 2 years ago

The last 10 videos have been a bit of a waste of time. Why not just pick out the Provider tutorial and then just jump to these connect classes. It has been a very mess path to get here!And what's with dumping everything into a single file - such a messy way of writing application code.

...I would have to agree with Ferdinand here.