React Hooks: useState

  Рет қаралды 3,868

Sam Meech-Ward

Sam Meech-Ward

Күн бұрын

Пікірлер: 12
@alexzahrai4703
@alexzahrai4703 10 ай бұрын
You explained how to use useState really well and provided a great example. I especially liked how you broke down how to lift state up and share it between components. Thank you!
@shadrack3370
@shadrack3370 Ай бұрын
your videos are extremely underrated
@sethurk
@sethurk Жыл бұрын
Simply WoW! Great demo of async operation and use of useState. You make the underlying concepts so much clearer. Thank you Sam..
@MortadhaBahri-h2e
@MortadhaBahri-h2e 4 ай бұрын
great work
@nickyggoodman
@nickyggoodman Ай бұрын
good series. thanks. dropping a comment for the yt algorithm :)))
@siavoshoon
@siavoshoon 2 жыл бұрын
I truley enjoyed. Adding Favorite button was exciting part🤩
@aprilm2941
@aprilm2941 2 жыл бұрын
Great video. You make more complicated concepts easy to digest. Question though, why not use "getter" and "setter" language when talking about useState variables?
@SamMeechWard
@SamMeechWard 2 жыл бұрын
The words "getter" and "setter" are usually used in OOP language to talk about a method that will get or set a property on an object, usually with some syntactic sugar to hide that you're calling a method. In this case, the set function acts like a setter, but it's a little weird in it's behaviour because it doesn't actually set any value, nothing we can interface with anyway. Instead it enqueues a change that will happen upon the components re render, so it's more like a "set on re render also re render er"than a simple setter. As for the getter, well it's not a getter at all, it's just the value. Nothing fancy, just a value. To call it a getter might imply that the value could be used to get the most up to date version of the state, but this is not the case. Whatever references that value on the current render will always read that value, never a new value. You can test this by trying to create a simple stopwatch app without using the updater function. TL;DR The value isn't a getter, it's just a plain ol' js value The setter is kind of like a setter but different enough that I wouldn't use "getter" and "setter" and feel ok about it
@aprilm2941
@aprilm2941 2 жыл бұрын
I agree with everything you’re saying BUT you’re being too… what’s that word? Pedantic.
@SamMeechWard
@SamMeechWard 2 жыл бұрын
Yes! You’re welcome 🤗🤗🤗🤗
@maimoh8437
@maimoh8437 2 жыл бұрын
thanks 🔥
@Pareshbpatel
@Pareshbpatel Жыл бұрын
{2023-07-10}
React State Array of Objects
20:55
Sam Meech-Ward
Рет қаралды 26 М.
What is React.js? Get started with React using Vite
18:22
Sam Meech-Ward
Рет қаралды 20 М.
Шок. Никокадо Авокадо похудел на 110 кг
00:44
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 51 МЛН
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 216 МЛН
Cute
00:16
Oyuncak Avı
Рет қаралды 11 МЛН
Learn useRef in 11 Minutes
10:20
Web Dev Simplified
Рет қаралды 638 М.
React Hooks: useEffect - Everything You Need To Know
43:23
Sam Meech-Ward
Рет қаралды 4,3 М.
React Hooks: useReducer
12:12
Sam Meech-Ward
Рет қаралды 5 М.
React Props are Easy
18:05
Sam Meech-Ward
Рет қаралды 9 М.
6 State Mistakes Every Junior React Developer Makes
15:53
Lama Dev
Рет қаралды 267 М.
84 - React JS - hook, useState, хуки
38:40
IT-KAMASUTRA
Рет қаралды 59 М.
React useState() hook introduction 🎣
16:33
Bro Code
Рет қаралды 28 М.
Fetching and Posting Data in React
29:03
Sam Meech-Ward
Рет қаралды 4,6 М.
React 13: Хук useState
23:16
Школа web-программирования Constcode
Рет қаралды 4,6 М.
Conditional Rendering Components in React
13:10
Sam Meech-Ward
Рет қаралды 7 М.
Шок. Никокадо Авокадо похудел на 110 кг
00:44