Back to Browse

MapStateToProps and MapDispatchToProps in React Redux - How To Use

8.3K views
Apr 8, 2021
17:16

🧠 1-on-1 Frontend Mentorship (90-min paid session) β†’ https://monsterlessons-academy.com/mentorship?utm_source=youtube&utm_medium=description_link 🎁 Free PDF: Senior Developer Starter Kit (Checklist + 30-Day Plan) β†’ https://monsterlessons-academy.com/newsletter_subscribers/senior_starter_kit?utm_source=youtube&utm_medium=description_link πŸš€ Go from Middle to Senior Frontend in 12 Weeks β†’ https://monsterlessons-academy.com/courses/frontend-developer-middle-to-senior-bootcamp?utm_source=youtube&utm_medium=description_link In this video you will learn how to work with mapStateToProps and mapDispatchToProps on the real example. mapStateToProps is the only correct way to get Redux state in our React components. mapDispatchToProps helps us to simplify dispatch functions and isolate our component of them. Also we will have a look on features of connect function from react-redux. πŸ›  Need a video editor? Contact Ekaterina: [email protected] πŸ“Œ Social Twitter: https://twitter.com/monster_lessons Instagram: https://www.instagram.com/monsterlessonsacademy Facebook: https://www.facebook.com/monsterlessonsacademy Linkedin: https://www.linkedin.com/company/monsterlessons-academy Tiktok: https://www.tiktok.com/@monsterlessonsacademy πŸ“š References Source code - https://github.com/monsterlessonsacademy/monsterlessonsacademy/tree/91-mapstatetoprops-mapdispatch-to-props πŸ•’ TIMESTAMPS 0:00 Introduction 0:17 React + Redux project example 2:27 Normalizing data in mapStateToProps 6:39 Performance optimizations in mapStateToProps 7:30 Accessing props 9:36 MapDispatchToProps function 13:57 Adding sugar to mapDispatchToProps 16:14 Omitting arguments in connect 16:39 Outro This video is NOT sponsored. Some product links are affiliate links which means if you buy something I'll receive a small commission.

Download

0 formats

No download links available.

MapStateToProps and MapDispatchToProps in React Redux - How To Use | NatokHD