React tips: Update state the CORRECT way ✅

Опубликовано: 22 Октябрь 2024
на канале: WebDevEducation
18,213
422

🎓Why we should always use the updater function when updating state in React based on a previous value of that state.

🔔Subscribe if you want more free tutorials like this one!    / @webdeveducation  

📺[Watch next] React Optional Chaining with real world example:
   • React JS Optional Chaining (ES2020) t...  

If you liked this video please check out my udemy courses:
Gatsby JS, Prismic CMS & Netlify: Build RAPID sites in 2020
https://www.udemy.com/course/gatsby-j...

Gatsby JS & Firebase: Build HYBRID realtime + static sites
https://www.udemy.com/course/gatsby-j...

Gatsby JS: Build static sites with React Wordpress & GraphQL
https://www.udemy.com/course/gatsby-j...

React styled-components v5 (2020 edition)
https://www.udemy.com/course/react-st...

Redux Saga (with React and Redux): Fast-track intro course
https://www.udemy.com/course/redux-sa...

#reactjs #reacttips #reacthooks #reactstate #usestate #usestatehook #reactusestate