React State Array of Objects
HTML-код
- Опубликовано: 5 июл 2024
- 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 Наука
Thank you, Sam. I really struggled to find out how to update an object in state. This video helped massively.
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.
You just explain what my teacher couldn't. I was just about to give up, Thank you very much 🙏
Thank you so much for the updating array of objects part! You've been a saviour
Man really good presentation of complex things 🙏 Thank you so much
Perfect for newbie devs who know a bit of javascript and trying to get around with React. I'm a fan now. Thanks
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.
Thanks a lot, this really helped with my questions. Good luck to you
You got me out of a jam today. Thanks dude
Thank you so much for this amazing video. It helped a lot ^^
thanks for this series!
great video, amazing explanation
Thank you so much Sam
Thank you for saving a lot of time
Thank you so much!
Thanks really helpful 😊
God bless you man!
Thanks!! soooo much
You're welcome!
that sort technique was cool
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 …
Thank you. I don't have any videos on data structures, but I might make some in the future
React State Array Objects with CRUD Operations and sorting; beautifully explained. Thanks, Sam.
{2023-07-06}
Sos god amigo :D
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?
gold vidéo
which extension have you used for auto suggestion as in 10:32, pls tell
Its github copilot
the best
🤗
Auto suggestion extension?
rather you would store the temporary data in state and then send it off to the server afterwards
how are you using crypto inside react?
good content. thanks