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
  • НаукаНаука

Комментарии • 35

  • @samsale7181
    @samsale7181 Год назад +4

    Thank you, Sam. I really struggled to find out how to update an object in state. This video helped massively.

  • @pizza_t1me
    @pizza_t1me Год назад +2

    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 🙏

  • @swarnimpaudyal
    @swarnimpaudyal Год назад

    Thank you so much for the updating array of objects part! You've been a saviour

  • @naveenbv1838
    @naveenbv1838 Год назад

    Man really good presentation of complex things 🙏 Thank you so much

  • @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

  • @Veneris96
    @Veneris96 7 месяцев назад

    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.

  • @raheem81kg
    @raheem81kg Год назад

    Thanks a lot, this really helped with my questions. Good luck to you

  • @JaeWoodberry
    @JaeWoodberry 5 месяцев назад +1

    You got me out of a jam today. Thanks dude

  • @LilithinMerria
    @LilithinMerria Год назад +1

    Thank you so much for this amazing video. It helped a lot ^^

  • @QtheCoder
    @QtheCoder Год назад +1

    thanks for this series!

  • @simplyabdou8425
    @simplyabdou8425 Год назад +1

    great video, amazing explanation

  • @facundoferrando7215
    @facundoferrando7215 5 месяцев назад

    Thank you so much Sam

  • @usmanali-jd7fp
    @usmanali-jd7fp Год назад

    Thank you for saving a lot of time

  • @DezurzZ
    @DezurzZ 8 месяцев назад

    Thank you so much!

  • @shehrozamin9543
    @shehrozamin9543 Год назад

    Thanks really helpful 😊

  • @joelblenman8840
    @joelblenman8840 Год назад

    God bless you man!

  • @nostalgicnow6001
    @nostalgicnow6001 Год назад +1

    Thanks!! soooo much

  • @mehrosenasir9974
    @mehrosenasir9974 11 месяцев назад

    that sort technique was cool

  • @dryujin1004
    @dryujin1004 Год назад +3

    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

  • @Pareshbpatel
    @Pareshbpatel Год назад

    React State Array Objects with CRUD Operations and sorting; beautifully explained. Thanks, Sam.
    {2023-07-06}

  • @fedepalma1981
    @fedepalma1981 Год назад

    Sos god amigo :D

  • @loo6942
    @loo6942 6 месяцев назад

    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?

  • @fromagetriste
    @fromagetriste 6 месяцев назад

    gold vidéo

  • @user-ie2hi8ng3v
    @user-ie2hi8ng3v Год назад

    which extension have you used for auto suggestion as in 10:32, pls tell

  • @kashmirtechtv2948
    @kashmirtechtv2948 Год назад

    the best

  • @laxmiprasanna4092
    @laxmiprasanna4092 11 месяцев назад

    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