Leave a Reply

128 Comments on "React JS / Redux Tutorial – 9 – Actions and Action Creators"

Notify of
avatar

Oscar de la Hera Gomez
Guest
Oscar de la Hera Gomez
1 month 2 days ago

Thank you, this was immensely helpful

DagicCross
Guest
DagicCross
1 month 7 days ago

jeez redux is like a skeleton with bones connected and there's a brain send them signal decide what to do, even on an event handler needs to be this complex. why….

David
Guest
David
2 months 12 days ago

3:47am! 🦉

Puni Charana
Guest
Puni Charana
5 months 11 days ago

why not just use this.props.dispatch({type:"ACTION_TYPE", payload:{}}) 7:06 instead of creating the extra function.

Cory Baker
Guest
Cory Baker
5 months 18 days ago

bro wtf is wrong with you

Awa Melvine
Guest
Awa Melvine
5 months 23 days ago

In some cases, instead of fully defining the mapDispatchToProps function as you did, one can just pass an object as the second parameter to the connect function, containing all the action creators. Something like this:export default connect(mapStateToProps, { selectUser, someOtherActionCreator })(UserList);as opposed to this:function mapDispatchToProps(dispatch) { return bindActionCreators({selectUser}, dispatch);}export default connect(mapStateToProps, mapDispatchToProps)(UserList);Can someone help me confirm and explain this?​ In what cases can we use the shorter version, the one that doesn't need you to define the mapDispatchToProps? Thanks for any clarifications 😀

Awa Melvine
Guest
Awa Melvine
5 months 23 days ago

You have a gift for explaining stuff, Bucky. Great job!

jking54321
Guest
jking54321
7 months 13 hours ago

Thank you so much for showing what I was missing, bindActionCreators. I was following other guides on hooking up redux to a react app they left that out or were using decorators to connect. No actions will be dispatched without that.

Rob V
Guest
Rob V
7 months 23 days ago

React js demos, code, tutorials,…  Helped me a lot – Happy Coding!  yamechanic.com/1aRD

Rob V
Guest
Rob V
7 months 27 days ago

REACT code, Tutorials, Demos,…  Helped me a lot – Happy Coding!  yamechanic.com/1aRD

1 2 3 9
wpDiscuz