React State Array of Objects

  Рет қаралды 24,567

Sam Meech-Ward

Sam Meech-Ward

Күн бұрын

Learn how to use useState to keep track of arrays of objects in a react app.
🔗Starter Code:
github.com/Sam-Meech-Ward/rea...
🔗Final Code:
github.com/Sam-Meech-Ward/rea...
This is video #7 in my react series:
#6 useState: • React Hooks: useState
#8 useReducer: • React Hooks: useReducer
Join this channel to support these videos and get access to perks:
/ @sammeechward
Chapters:
0:00​ Intro
1:38 Adding an object to the array
5:12 Deleting an object from the array
8:52 Update an object in the array
15:37 Sort the array of objects
19:09 Summary
🔗Moar Links
My Website: www.sammeechward.com
Instagram: / meech_ward
Twitter: / meech_ward
Github: github.com/orgs/Sam-Meech-Ward

Пікірлер: 36
@samsale7181
@samsale7181 Жыл бұрын
Thank you, Sam. I really struggled to find out how to update an object in state. This video helped massively.
@Relaxl0l
@Relaxl0l Жыл бұрын
Thank you so much! I've lost quite a bit of time trying to update array of objects inside of the child component until I found your video. It covered pretty much all I needed.
@DaMugix3
@DaMugix3 Жыл бұрын
You just explain what my teacher couldn't. I was just about to give up, Thank you very much 🙏
@Veneris96
@Veneris96 6 ай бұрын
I kept getting an array of undefined values when trying to update an object, your video made me realise what I was doing wrong. Thank you Sam.
@naveenbv1838
@naveenbv1838 Жыл бұрын
Man really good presentation of complex things 🙏 Thank you so much
@JaeWoodberry
@JaeWoodberry 4 ай бұрын
You got me out of a jam today. Thanks dude
@PM-rs4te
@PM-rs4te Жыл бұрын
Perfect for newbie devs who know a bit of javascript and trying to get around with React. I'm a fan now. Thanks
@swarnimpaudyal
@swarnimpaudyal Жыл бұрын
Thank you so much for the updating array of objects part! You've been a saviour
@raheem81kg
@raheem81kg Жыл бұрын
Thanks a lot, this really helped with my questions. Good luck to you
@LilithinMerria
@LilithinMerria Жыл бұрын
Thank you so much for this amazing video. It helped a lot ^^
@QtheCoder
@QtheCoder Жыл бұрын
thanks for this series!
@simplyabdou8425
@simplyabdou8425 Жыл бұрын
great video, amazing explanation
@facundoferrando7215
@facundoferrando7215 5 ай бұрын
Thank you so much Sam
@usmanali-jd7fp
@usmanali-jd7fp Жыл бұрын
Thank you for saving a lot of time
@shehrozamin9543
@shehrozamin9543 Жыл бұрын
Thanks really helpful 😊
@DezurzZ
@DezurzZ 7 ай бұрын
Thank you so much!
@videomanpro
@videomanpro Жыл бұрын
I just subscribed you should have more sub bro. good content.🤩
@mehrosenasir9974
@mehrosenasir9974 10 ай бұрын
that sort technique was cool
@joelblenman8840
@joelblenman8840 Жыл бұрын
God bless you man!
@Pareshbpatel
@Pareshbpatel 11 ай бұрын
React State Array Objects with CRUD Operations and sorting; beautifully explained. Thanks, Sam. {2023-07-06}
@nostalgicnow6001
@nostalgicnow6001 Жыл бұрын
Thanks!! soooo much
@SamMeechWard
@SamMeechWard Жыл бұрын
You're welcome!
@dryujin1004
@dryujin1004 Жыл бұрын
I am a junior developer work at a small company I watched a lot of videos about react for studying Your video is the most interesting and fun to understand Thanks ! If you have another class about data structure, i really want to watch it lol. Cuz there are a lot of tutorial about data structure, but that was hard to understand it’s concept, how that works …
@SamMeechWard
@SamMeechWard Жыл бұрын
Thank you. I don't have any videos on data structures, but I might make some in the future
@loo6942
@loo6942 5 ай бұрын
If after doing the copy of the array using the spread operator I were to modify some property inside one of the objects in the copy, I would also be modifying it in the state directly and that would be a problem, right? So how would I do it if I want to use a matrix and want to modify its elements? Would doing an array of arrays or array of objects be a bad idea because modifying the elements would mean modifying the state directly? Maybe I should do a deep copy with JSON.parse(JSON.stringify... or is there a better alternative for this?
@fedepalma1981
@fedepalma1981 Жыл бұрын
Sos god amigo :D
@fromagetriste
@fromagetriste 5 ай бұрын
gold vidéo
@user-ie2hi8ng3v
@user-ie2hi8ng3v Жыл бұрын
which extension have you used for auto suggestion as in 10:32, pls tell
@laxmiprasanna4092
@laxmiprasanna4092 10 ай бұрын
Its github copilot
@kashmirtechtv2948
@kashmirtechtv2948 Жыл бұрын
the best
@SamMeechWard
@SamMeechWard Жыл бұрын
🤗
@laxmiprasanna4092
@laxmiprasanna4092 10 ай бұрын
Auto suggestion extension?
@JakubSK
@JakubSK Жыл бұрын
rather you would store the temporary data in state and then send it off to the server afterwards
@kerodfresenbetgebremedhin1881
@kerodfresenbetgebremedhin1881 Жыл бұрын
how are you using crypto inside react?
@trappedmasturbate5038
@trappedmasturbate5038 4 ай бұрын
good content. thanks
React Hooks: useReducer
12:12
Sam Meech-Ward
Рет қаралды 4,1 М.
1 класс vs 11 класс  (игрушка)
00:30
БЕРТ
Рет қаралды 3,1 МЛН
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
BongBee Family
Рет қаралды 16 МЛН
Каха инструкция по шашлыку
01:00
К-Media
Рет қаралды 7 МЛН
Conditional Rendering Components in React
13:10
Sam Meech-Ward
Рет қаралды 6 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
6 State Mistakes Every Junior React Developer Makes
15:53
Lama Dev
Рет қаралды 263 М.
10 React Antipatterns to Avoid - Code This, Not That!
8:55
Fireship
Рет қаралды 714 М.
React Hooks: useEffect - Everything You Need To Know
43:23
Sam Meech-Ward
Рет қаралды 3,7 М.
All useEffect Mistakes Every Junior React Developer Makes
22:23
Avoid this React State Mistake | React Previous State Explained
13:23
How Did I Not Know This TypeScript Trick Earlier??!
9:11
Josh tried coding
Рет қаралды 202 М.
Goodbye, useEffect - David Khourshid
29:59
BeJS
Рет қаралды 494 М.
Где раздвижные смартфоны ?
0:49
Не шарю!
Рет қаралды 783 М.
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 255 М.
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 4,9 МЛН