Avoid this React State Mistake | React Previous State Explained
34 هزار بار بازدید -
3 سال پیش
-
Web Dev Roadmap for Beginners
Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap
In this tutorial, React Previous State is explained. I will also explain why using setState with count + 1 is NOT wrong... but updating previous state in React requires an understanding of how state and re-rendering work together.
🚩 Subscribe ➜ https://bit.ly/3nGHmNn
🚀 React JS for Beginners full course - 9 hours: React JS Full Course for Beginners | ...
Avoid this React State Mistake | React Previous State Explained
(00:00) Intro
(00:05) count + 1 is NOT wrong
(01:12) Know when to use the right tool
(01:28) The Golden Rule
(02:09) Previous State function example
(03:05) Why prefer the prevState function
(07:28) Previous state with arrays
(10:03) Previous state with objects
(12:06) Summary
🔗 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 understanding Previous State in React helpful? If so, please share. Let me know your thoughts in the comments.
#react #previous #state
In this tutorial, React Previous State is explained. I will also explain why using setState with count + 1 is NOT wrong... but updating previous state in React requires an understanding of how state and re-rendering work together.
🚩 Subscribe ➜ https://bit.ly/3nGHmNn
🚀 React JS for Beginners full course - 9 hours: React JS Full Course for Beginners | ...
Avoid this React State Mistake | React Previous State Explained
(00:00) Intro
(00:05) count + 1 is NOT wrong
(01:12) Know when to use the right tool
(01:28) The Golden Rule
(02:09) Previous State function example
(03:05) Why prefer the prevState function
(07:28) Previous state with arrays
(10:03) Previous state with objects
(12:06) Summary
🔗 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 understanding Previous State in React helpful? If so, please share. Let me know your thoughts in the comments.
#react #previous #state
3 سال پیش
در تاریخ 1400/07/16 منتشر شده
است.
34,041
بـار بازدید شده