You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you very very much for this great tutorial. It is much, much more clear than the redux and react-redux tutorials/documentations combined!
I have a small suggestion: replace { getData } on line 33 of Posts.js with a mapDispatchToProps function that extends the mapDispatchToProps function used up to this point in the tutorial as follows
First of all, thank you very very much for this great tutorial. It is much, much more clear than the
redux
andreact-redux
tutorials/documentations combined!I have a small suggestion: replace
{ getData }
on line 33 ofPosts.js
with amapDispatchToProps
function that extends themapDispatchToProps
function used up to this point in the tutorial as followsI'm suggesting this change since it took me a while to figure out why
this.props.getData()
on line 11 works without a call todispatch
. It is only after I looked at theconnect
docs that I learned that passing an object instead of a function toconnect
bindsdispatch
to each action creator.Don' get me wrong: it's useful to know about the Object Shorthand Form. It's just that it's a bit much when learning the basics. :)
The text was updated successfully, but these errors were encountered: