useReducer is BETTER than useState | React Hook useReducer Tutorial

Dave Gray
Dave Gray
63.2 هزار بار بازدید - 3 سال پیش - Web Dev Roadmap for Beginners
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: Twitter: yesdavidgray
LinkedIn: LinkedIn: davidagray
Blog: https://yesdavidgray.com
Reddit: 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
3 سال پیش در تاریخ 1400/09/09 منتشر شده است.
63,286 بـار بازدید شده
... بیشتر