React Hooks: useState

  Рет қаралды 4,444

Sam Meech-Ward

Sam Meech-Ward

Күн бұрын

Пікірлер: 12
@alexzahrai4703
@alexzahrai4703 Жыл бұрын
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 4 ай бұрын
your videos are extremely underrated
@sethurk
@sethurk 2 жыл бұрын
Simply WoW! Great demo of async operation and use of useState. You make the underlying concepts so much clearer. Thank you Sam..
@nickyggoodman
@nickyggoodman 4 ай бұрын
good series. thanks. dropping a comment for the yt algorithm :)))
@siavoshoon
@siavoshoon 2 жыл бұрын
I truley enjoyed. Adding Favorite button was exciting part🤩
@MortadhaBahri-h2e
@MortadhaBahri-h2e 7 ай бұрын
great work
@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
Рет қаралды 27 М.
React Props are Easy
18:05
Sam Meech-Ward
Рет қаралды 10 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
React Hooks: useReducer
12:12
Sam Meech-Ward
Рет қаралды 6 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 874 М.
How to Use Cursor: The Ultimate AI Coding Tool Guide
22:26
pookie
Рет қаралды 1,2 М.
DiagramGPT - Honest Review of Eraser AI
8:22
Sam Meech-Ward
Рет қаралды 153 М.
React Hooks: useEffect - Everything You Need To Know
43:23
Sam Meech-Ward
Рет қаралды 4,7 М.
Fetching and Posting Data in React
29:03
Sam Meech-Ward
Рет қаралды 5 М.
React Hooks Crash Course (useMemo, useCallback and more).
31:49
developedbyed
Рет қаралды 88 М.
Every Developer Needs a Raspberry Pi
27:27
Sam Meech-Ward
Рет қаралды 1 МЛН
React Proxy | Easiest Fix to CORS Errors
15:52
Sam Meech-Ward
Рет қаралды 95 М.