useState | Simple React Hooks #shorts

preview_player
Показать описание
Learn how useState works in React #react #reactjs #reacttutorial #reactdeveloper #learntocode #coding #programming #learncoding
Рекомендации по теме
Комментарии
Автор

When updating the state with a previous value, the setState function gives you the value. Example: setCount(count => count + 1)

aa
Автор

Thanks, love straight to the point videos like this one. 👍

nikvitorovic
Автор

Can we modify state directly? Or should we just do callback function instead with the previous value as a parameter?

davitkhoshtaria