useReducer is BETTER than useState | React Hook useReducer Tutorial
Dave Gray Dave Gray
339K subscribers
64,641 views
3K

 Published On Nov 30, 2021

Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap

If you are building React apps with multiple state values to keep track of, your React apps need the useReducer hook! In this useReducer React Hook tutorial, you will learn how to apply useReducer to manage the state of your apps.

🚩 Subscribe ➜ https://bit.ly/3nGHmNn

🚀 React JS for Beginners full course - 9 hours:    • React JS Full Course for Beginners | ...  

🔗 Source Code: https://github.com/gitdagray/usereduc...

useReducer is BETTER than useState | React Hook useReducer Tutorial

(00:00) Intro
(00:12) Welcome and Overview
(01:05) useReducer vs useState
(01:53) Initializing useReducer
(03:33) Creating the reducer function
(05:42) Using dispatch and updating JSX
(07:12) Moving all state and handling an action payload
(08:25) An easy mistake to make
(10:01) Displaying state values in JSX
(12:44) Recommended: Action object lookup and dot notation

🔗 ES7 React JS Snippets Extension for VS Code:
https://marketplace.visualstudio.com/...

🔗 React Dev Tools Extension for Chrome:
https://chrome.google.com/webstore/de...

📚 References:
ReactJS Official site: https://reactjs.org/
React Wikipedia: https://en.wikipedia.org/wiki/React_(...)
React Jobs: https://www.ziprecruiter.com/candidat...

✅ Follow Me:
Twitter:   / yesdavidgray  
LinkedIn:   / davidagray  
Blog: https://yesdavidgray.com
Reddit:   / daveoneleven  

Was this tutorial about the React hook useReducer helpful? If so, please share. Let me know your thoughts in the comments.

#usereducer #react #hooks

show more

Share/Embed