Complete React Tutorial (& Redux ) #42 - Map Dispatch To Props

preview_player
Показать описание
Hey gang, in this React & Redux tutorial I'll show you how we can map a dispatch to our component props, so that we can fire a dispatch from our components. In this tutorial we'll be dispatching a delete action, to delete a blog post from our Redux store.

----------------------------------------

🐱‍💻 Course Links:

----------------------------------------

Рекомендации по теме
Комментарии
Автор

I was taking a course from Udemy on React and when I reached the redux section I had to come and get some more understanding from Youtube. And after watching this React Playlist from video 36, I think this is the best and the simplest explanation for redux. I finally understand mapStateToProps and mapDistaptch to props. Thanks so much, Net Ninja.

dijiflex
Автор

The best instruction about mapDispatchToProps I've found after looking everywhere in the net without finding another as close as this video in explaining it.

PutraAbbas
Автор

Man, you taught this lesson like a boss... thanks a lot!

raphaelalvarenga
Автор

i dont know why i retain more of the concepts when i learn from you, than from other instructors .
Thank you Net Ninja

fidellis
Автор

I just love how you explain the things and pointing the corresponding code at the same time - it makes the hard moments so clearly understandable, - many thanks for your work and especially this series! I`m your fan, dude, definitely!

elsombrero
Автор

Awesome video, i just started on a company that's using react with redux and dispatch pattern and i've never had to use before. that video saved my life

johannhermany
Автор

Hi, The Net Ninja, thank you for amazing set of amazing tutorials!
It's pleasure to watch your high quality tutorials: informative, clear, easy to understand, good narrative and voice.

I like what you are doing with React, however i't interesting what you think about VUE.
Can you compare it please in couple of sentences? Or maybe you planning to record a comparison video? That would be great.

(i saw couple comparison videos, however they looked a bit biased, and it's interesting to know what you think)

VadimBesedin
Автор

Wonderful tutorials! I finally understood how it's works! Thank you!

anastasiyapachomova
Автор

It's the best tutorial I saw ever

HaiSamCAEG
Автор

Awesome! Very usefull lesson, as the whole playlist! Thank you, Ninja!

ridl
Автор

was struggling with the mapDispatchToProps. Thanks

SnehasishGhoshSg
Автор

I just love how you explain the things

thankx mann i'm doing that on react native

mohamdalmhde
Автор

Great teaching! Finally got my head wrapped around dispatch to props :D

Skillthrive
Автор

Thanks a lot ! Like the way you explain things ... make understanding easy.

happyrealtor
Автор

Thank u for this awesome video and series

AbhishekKumar-mqtt
Автор

Hi Shaun, thanks for the wonderful explanations, I have a question - why we introduced `handleClick` instead of calling `this.props.deletePost` directly? Is there a specific reason or, just to write cleaner code?

amigaanguy
Автор

Careful guys, he is the divine instructor...

arbazadam
Автор

If you are not using mapStateToProps in a component, don't forget to put null in place of the same while writing export.

For example: I used redux to pass my jwt token in different components. What i did was-


const mapDispatchToProps = (dispatch) => {
return {
authtoken: (token) => { dispatch({type: 'authtoken', authtoken:token}) }
}
}

export default connect(null, mapDispatchToProps)(login);

kushalgupta
Автор

Thank you for this great tutorial. keep it up!

michaelariesmalaca
Автор

These tutorials are great, thanks! Also, what kind of keyboard are you using? The keys sound quite soft.

BrannonGlover