ReactJS Tutorial - 17 - List Rendering

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024

ความคิดเห็น • 190

  • @gabrielbessa2575
    @gabrielbessa2575 4 ปีที่แล้ว +165

    Best Teacher Ever

  • @omarmahmood4209
    @omarmahmood4209 ปีที่แล้ว +22

    If anyone needs the persons array:
    const persons = [
    {
    id: 1,
    name: 'Bruce',
    age: 30,
    skill: 'React'
    },
    {
    id: 2,
    name: 'Clark',
    age: 25,
    skill: 'Angular'
    },
    {
    id: 3,
    name: 'Diana',
    age: 28,
    skill: 'Vue'
    }
    ]

    • @josephbawo5652
      @josephbawo5652 6 วันที่ผ่านมา

      tahnk you my good friend

  • @rohitrai4215
    @rohitrai4215 5 ปีที่แล้ว +123

    As I am watching more and more of your videos on React, I am becoming more and more confident. Thanks for covering everything so neatly. I can't thank you enough.

    • @aribkamal3239
      @aribkamal3239 2 ปีที่แล้ว +4

      For real man, i bought so many udemy courses and other certificates. I understood them but not as well. But after this, following their projects will be a breeze.

    • @memeherp166
      @memeherp166 2 ปีที่แล้ว +3

      @@aribkamal3239 same, i wasted my money to udemy

    • @youssefhlem6270
      @youssefhlem6270 ปีที่แล้ว

      it just 16 video Wat da fuk ?!!

  • @zoalerix
    @zoalerix 3 ปีที่แล้ว +17

    This man is a great Teacher, Knows how to explain but most importantly the tutorials are so well constructed as whole. Exceptional work Brother!

  • @shivakumar_bammidi
    @shivakumar_bammidi 2 ปีที่แล้ว +7

    I'm sure that no one can beat you in teaching the react concept in the next 10 decades.
    Wonderful way of teaching.👏👏

  • @attilathehun6033
    @attilathehun6033 4 ปีที่แล้ว +11

    Best react tutorials I have seen so far. Short, simple, easy to understand. Good job, I hope you will be profiting from these.

  • @reeteshtiwari5257
    @reeteshtiwari5257 3 ปีที่แล้ว +43

    I will never forget three persons in my life:
    Bruce , Clark and Diana

  • @toannew
    @toannew 3 ปีที่แล้ว +10

    6:10 JS code inside HTML code, then HTML code inside JS code
    7:11 -7:26 Advantage of JSX code
    9:18 refactor the code into separate components
    10:30 destructure the props right in the parameter of function of fnctional component
    11:13: common pattern when building applications that render lists of data
    11:45 unique 'key' prop

  • @ivan-the-l
    @ivan-the-l 4 ปีที่แล้ว +17

    Simply the best React course for the beginners. Thank you so much!

  • @mannunni08
    @mannunni08 3 ปีที่แล้ว +5

    Big thanks to Vishwas for this beautiful classes, i am struggling to learn react to retain my position in my team. As a beginner last 2 months tried many methods now completely depending on this tutorial and getting some confidence. Thank you very much from 🇸🇬 singapore

  • @fredianriko5648
    @fredianriko5648 3 ปีที่แล้ว +2

    straight 1 and half day I've been watching this playlist, still hanging in this list rendering video.
    hang on, I'll make coffee and get back to the next videos

  • @amirkehtarian
    @amirkehtarian ปีที่แล้ว +2

    perfect teaching, minimal speak and maximum understanding of complex concepts, thanks to vishwa's master class free of charge in youtube
    Thank you so much dear Vishwas🙏

  • @swapnilvmahajan
    @swapnilvmahajan 5 ปีที่แล้ว +5

    Sir! you deserve a standing ovation.Thank you.

  • @zigzag4273
    @zigzag4273 4 ปีที่แล้ว +8

    7:44 "That sounded more complicated than it should be." Yep, he had me lost for a minute there.

  • @amitbasp
    @amitbasp 3 ปีที่แล้ว +5

    TH-cam should start enabling a 'Love' button instead of 'Like' for such phenomenal videos :)

  • @dishantkumawat7508
    @dishantkumawat7508 4 ปีที่แล้ว +1

    guess what im watching this series for second time just as a revision and the github link is helping a lot . Not to mention best react teacher ever

  • @ericnguyen23
    @ericnguyen23 4 ปีที่แล้ว +6

    You taught me something in under 12 minutes that would have taken me a week to figure out, not to mention made me a better developer! Subscribed!

  • @paintingmylifeawaify
    @paintingmylifeawaify 4 ปีที่แล้ว +4

    Your React tutorial series is amazing. Thank you for your hard work! :)

  • @vugargaragozlu6737
    @vugargaragozlu6737 5 ปีที่แล้ว +7

    who disliked this video? this is the best .map() explanation ive ever seen!

    • @fargh
      @fargh 4 ปีที่แล้ว +1

      Vishwas is great but this is easily his worst video (I've done the Chrome Extension and this one). I didn't dislike as Vishwas is amazing. But:
      (a) This is unreadable I have no idea what's going on and am just confused: personList = persons.map(person =>

      (b) Vishwas forgets to tell us to import Person.js into Namelist.js / vice versa
      (c) His use of copy+pastes for example when creating the big array means it's harder to code along
      (d) He doesn't explain how to reformat code automatically in VS Code. From my perspective all I see is his code just suddenly jumping around.
      Sorry Vishwas, I'm only marking you against your incredibly good videos overall. It's just this one isn't as good as your others for the reasons above.

    • @YodaSW2
      @YodaSW2 4 ปีที่แล้ว

      @@fargh Use Shift + Alt + F to format

  • @gargigoyal2582
    @gargigoyal2582 4 ปีที่แล้ว

    thank you so much...you know what is the best part of your videos....that you explain each thing first by simply doing it and then step by step changing it and shows the output......thank you so much

  • @gagandeepdayal
    @gagandeepdayal 2 ปีที่แล้ว

    Vishwas I never skip your ad on youtube as I know youtubers gets paid for ads viewed this is just my way of supporting you and yes I subscribed you as well. You are a teaching god.

  • @Ermosparis
    @Ermosparis 4 ปีที่แล้ว +1

    Dear Vishwas, thank you very much for this great tutorial. It's a pleasure to learn with you. Thank you for your time and effort.

  • @abidoyeridwan3886
    @abidoyeridwan3886 2 ปีที่แล้ว +2

    Don't forget to import Person from "./Person" in your NameList.js... Great Course

  • @nesmaaboki7213
    @nesmaaboki7213 2 ปีที่แล้ว +1

    I rarely comment on a video, but I have to say this series is just amazing

  • @user-eu7bh5mt5s
    @user-eu7bh5mt5s 5 ปีที่แล้ว +19

    I can see that you're a DC fan Vishwas... no one is perfect :D Keep up the good work. Great video.

  • @kenshirohimura8587
    @kenshirohimura8587 2 ปีที่แล้ว

    This is defenily one of the best React tutorials for beginners.

  • @moizkhalid2714
    @moizkhalid2714 4 ปีที่แล้ว +9

    in NameList component add
    import Person from './Person'

  • @Enigmata23
    @Enigmata23 2 ปีที่แล้ว

    I never considered storing my map method in a separate variable. Brilliant refactoring.

  • @gopalakrishnamurthy7862
    @gopalakrishnamurthy7862 3 ปีที่แล้ว +1

    👌👌Superb explanation,I loved ur way of explanation it is crystal clear👍👍

  • @soyaiburrahman3806
    @soyaiburrahman3806 5 ปีที่แล้ว +1

    if I could find you before i could save 4 days. i have never saw such clear explanation like you sir. i subscribed and start watching your video from right away. In fact i was looking for tutorial video that explain every curly brace whenever it is used again and again. also every centex. you should also avoid using one keyword over and over as a variable and file name. i hope you will be great if you keep teaching people. God bless you sir

  • @mayanks633
    @mayanks633 4 ปีที่แล้ว +1

    map is always a complicated subject in each language.
    so we all should watch this video atleay twice and hands on even after two days again.
    thanks viswas i know it is not easy to teach some morons. but u really know alot of things. it shows how much or practice and efforts you make.

  • @TheAdel136
    @TheAdel136 4 ปีที่แล้ว +2

    for those who face problemes when moving the elment inside the Person.js ( error message "person is not define ") just use this solution in the Person.js function :
    function Person(props) {
    return (


    my name is {props.person.name} i'am {props.person.age} and i know {props.person.skills}


    )
    }
    juste use props as argument inside the function then use {props.person.name} instead of using {person.name} for exemple and it will work ;)

  • @tatekgirma4086
    @tatekgirma4086 6 หลายเดือนก่อน

    Simple and easy to understand. Thank you.

  • @sudamwagh4501
    @sudamwagh4501 4 ปีที่แล้ว +3

    code in NameList.js
    import React from 'react'
    import Person from './Person'
    function NameList() {
    const persons = [
    {
    id : 1,
    name : 'Bruice',
    age : 30,
    skill : 'React'
    },
    {
    id : 2,
    name : 'Clark',
    age : 20,
    skill : 'React'
    },
    {
    id : 3,
    name : 'Diana',
    age : 35,
    skill : 'React'
    }
    ]
    const personList = persons.map(person => )
    return (

    {personList}

    )
    }
    export default NameList

  • @edwindodoh164
    @edwindodoh164 4 ปีที่แล้ว +2

    This is a very awesome tutorial.. love from Nigeria

  • @simonzkiflay289
    @simonzkiflay289 4 ปีที่แล้ว

    Best react tutorial by far! Thank You Vishwas!

  • @picnic.
    @picnic. 5 ปีที่แล้ว +8

    Sir, you must import person function component to the nameList component (import Person from './Person'). thank you

    • @moderncloth682
      @moderncloth682 3 ปีที่แล้ว

      Dude, THANK you.

    • @davidkubik4283
      @davidkubik4283 3 ปีที่แล้ว

      He probably didn't include this because he's using the Visual Code extension that auto fills this info

  • @ayushsaxena3689
    @ayushsaxena3689 3 ปีที่แล้ว +8

    If you are getting the error "Person is not defined", import it in NameList.js
    import Person from './Person';

    • @shonuff4323
      @shonuff4323 ปีที่แล้ว +1

      Thanks. I was wondering if he skipped that part. Glad I am not crazy.

  • @mhmdsahilk
    @mhmdsahilk ปีที่แล้ว

    Thanks Gopinath For this wonderful tutorial

  • @arkachakraborty843
    @arkachakraborty843 10 หลายเดือนก่อน

    Thanks for you lectures sir!

  • @ndahayokevin7626
    @ndahayokevin7626 3 ปีที่แล้ว

    Vishwas you are the best React tutor

  • @mihajloilic5836
    @mihajloilic5836 3 ปีที่แล้ว

    Awesome, I displayed while learning all of them in table! :)

  • @ImperiousRex13
    @ImperiousRex13 2 ปีที่แล้ว

    I'd like to 2nd what @Rohit Rai said. Great videos and thank you so much!

  • @vishalkshatriya7498
    @vishalkshatriya7498 4 ปีที่แล้ว +2

    Cannot read property 'name' of undefined . PLEASE SOLVE THIS ERROR

  • @ArjunSingh-oo1mh
    @ArjunSingh-oo1mh 4 ปีที่แล้ว

    These videos are exciting me to keep watching

  • @alokmarathe2517
    @alokmarathe2517 ปีที่แล้ว +1

    7:56 lines of code:
    const persons = [
    {
    id: 1,
    name: "Bruce",
    age: 30,
    skill: "React",
    },
    {
    id: 2,
    name: "Clark",
    age: 25,
    skill: "Angular",
    },
    {
    id: 3,
    name: "Diana",
    age: 28,
    skill: "Vue",
    },
    ]

    • @elia552
      @elia552 ปีที่แล้ว

      thank you

  • @lathagm666
    @lathagm666 10 หลายเดือนก่อน

    completed video 17. Thank you :-)

  • @vaibsify
    @vaibsify 2 ปีที่แล้ว

    awesome explanation 🙏

  • @skall3112
    @skall3112 4 ปีที่แล้ว

    thank You for the help with React - love the videos - short, understandable like it should be
    thanks again and keep going :)

  • @balajir6670
    @balajir6670 ปีที่แล้ว

    Very good explanation .Thanks ❤

  • @haripraveensubramanian6595
    @haripraveensubramanian6595 4 ปีที่แล้ว

    thank you so much for explaining things so easily

  • @tejamaroju123
    @tejamaroju123 2 ปีที่แล้ว +1

    Thank you sir

  • @itgiants5218
    @itgiants5218 3 ปีที่แล้ว +1

    const personList = persons.map(person => (

    Your name Is: {person.name}
    Your Age Is: {person.age}
    Your Skill Is: {person.skill}

    ))
    and in return
    {personList}

    • @itgiants5218
      @itgiants5218 3 ปีที่แล้ว

      To make it better:
      const personList = persons.map(person => (

      Your name Is: {person.name}
      Your Age Is: {person.age}
      Your Skill Is: {person.skill}

      ));
      return(
      {personList}
      )

  • @snehaldeshpande5810
    @snehaldeshpande5810 4 ปีที่แล้ว

    Its very helpful and its clears the basic. and please make viedo on routing

  • @UdayPawarUdi
    @UdayPawarUdi 5 ปีที่แล้ว +6

    Import
    import Person from './Person';
    in NameList.js

  • @rahul-ti9cm
    @rahul-ti9cm ปีที่แล้ว

    great explanation

  • @mountainscott5274
    @mountainscott5274 4 ปีที่แล้ว +2

    const personList = persons.map(person =>
    this is why I just use "x", "item" , "elem(ent)", or "dict" (or something similar) when mapping because I don't find code lines like this all that readable. To each his own

  • @soumityachauhan8609
    @soumityachauhan8609 4 ปีที่แล้ว +2

    Name is undefined in person.js ?

  • @milosleng1175
    @milosleng1175 3 ปีที่แล้ว

    Hats down man. You are the best!

  • @aneeshkalra3360
    @aneeshkalra3360 3 หลายเดือนก่อน

    I know it must sound like a vague question, but in this video at 7:28 if nameList is an array of JSX elements, how are we directly returning it in the return statement? Since in the beginning you used array index to display individual elements in the array. So why dont we need the array index to display the new array values?

  • @amolmali3583
    @amolmali3583 3 ปีที่แล้ว

    Nice explanation..

  • @shivammaniya2962
    @shivammaniya2962 4 ปีที่แล้ว

    wow your teaching skills

  • @rumanaruma3952
    @rumanaruma3952 ปีที่แล้ว

    hello ...great teaching technique

  • @bluewonk9232
    @bluewonk9232 2 ปีที่แล้ว

    Thank you so much !

  • @betafuchs8490
    @betafuchs8490 4 ปีที่แล้ว +1

    Would the following be oke or is it bad practice?
    In NameList.js:
    const personList = persons.map(person => Person(person))
    and in Person.js:
    function Person(person) { ... }

  • @soyaiburrahman3806
    @soyaiburrahman3806 5 ปีที่แล้ว +4

    how many person did you use sir ? you better user person1, person2, person3 like that . i bet using one key word over and over is which that gives so much confusion to understand. I think this is the main cause that make react so much harder to learn

  • @LordMegabite
    @LordMegabite 4 ปีที่แล้ว

    Men you are awesome teaching.

  • @chaitras4108
    @chaitras4108 4 ปีที่แล้ว

    The Best Teacher:)

  • @RyanMitchell-yy4no
    @RyanMitchell-yy4no ปีที่แล้ว

    great tutorial thank you

  • @reisezone4574
    @reisezone4574 2 ปีที่แล้ว +1

    Very useful but CAN U UPDATE THIS REACT COURSE WITH ONLY FUNCTIONAL COMPONENTS; BECAUSE THE CLASS COMPONENT WHICH U MOSTLY USED IS NOT LONGER USEFUL NOW ADAYS: OTHERWISE I REALLY ENJOY THE WAY U TEACH ITS FIRST BY STEP VERY ALL THE RELEVANT INFORMATION; BUT ONLY TRY TO UPDATE BY REMOVING CLASS COMPONENT AND FOCUS ON FUNCTIONAL COMPONENTS

  • @AAKSHAS
    @AAKSHAS 2 ปีที่แล้ว

    10:22 This line
    const personList = persons.map((person) => );
    can be rewriiten as (to avoid confusion): -
    const personList = persons.map((personTempVar) => );

  • @lgtecnology1908
    @lgtecnology1908 2 ปีที่แล้ว

    Thanks you!!! Good explanation!

  • @timr.8798
    @timr.8798 3 ปีที่แล้ว

    Simply awesome.

  • @djlinedance
    @djlinedance 2 ปีที่แล้ว

    Thank You!

  • @abrarfahim64
    @abrarfahim64 2 ปีที่แล้ว

    why has to return
    {personLists}
    ?
    because we have to return something? But where's the output ?

  • @snehalkumar.singh.cse2070
    @snehalkumar.singh.cse2070 2 ปีที่แล้ว

    Why does vs code sometimes highlights imports with the three dots underneath, as you can see while importing react.

  • @moderncloth682
    @moderncloth682 3 ปีที่แล้ว

    I love you, Vishwas.

  • @Humble_Artist
    @Humble_Artist 4 ปีที่แล้ว

    Getting this error.
    Failed to compile
    ./src/components/NameList.js
    Line 26:47: 'Person' is not defined react/jsx-no-undef
    Search for the keywords to learn more about each error.
    This error occurred during the build time and cannot be dismissed.

  • @lasithadulshan7357
    @lasithadulshan7357 3 ปีที่แล้ว

    Thank you .. ! ❤

  • @swapnilkatpally4808
    @swapnilkatpally4808 4 ปีที่แล้ว

    I am trying to iterate through a list of 15 items. Each item is bootstrap card which displays image and description. So 5 cards in each row i am supposed to obtain 3 rows. But what i observed is only 10 cards(2 rows) are displayed. I tried with 6 cards in row i am getting 12 cards. The missing part is scrolling. Only two rows are obtained which fit in screen. What would be the issue. Thanks in advance.

  • @Aditya.Santra
    @Aditya.Santra 3 ปีที่แล้ว

    amazing video

  • @ishansharma9152
    @ishansharma9152 2 ปีที่แล้ว

    Map method is very similar to Select method in LINQ

  • @eduardom800
    @eduardom800 ปีที่แล้ว

    I have an issue at 10:14, In my computer's setup, if I do not import Person into NameList throws and error as Person is not defined. Once imported Person.js into NameList.js works as stated.

  • @vishwajeetohal9137
    @vishwajeetohal9137 2 ปีที่แล้ว

    10:46 Why do we need to add curly braces while accepting person as a parameter?

  • @dmigrz
    @dmigrz 2 ปีที่แล้ว

    7:10 How did you make the code cleaner please, did you use an extension?

  • @ankandhar9647
    @ankandhar9647 3 ปีที่แล้ว

    Why you are using same 'person' name so many times in arrow function, as component & props unnecessary ....makes it very confusing to differentiate.....

  • @awaisshafiqofficial
    @awaisshafiqofficial 3 ปีที่แล้ว

    I am facing an error ,, my pointer points on id when i am assigning an array with id=1, and so on ,,, but i am facing expected tokken i mean SyntaxError and i have looked multiple times here i have seen no SyntaxError,, i have coped same code as you have written on your Vs code.

  • @jaKERmEn100
    @jaKERmEn100 3 ปีที่แล้ว

    Thanks

  • @helanymelo4050
    @helanymelo4050 3 ปีที่แล้ว

    Amazing!
    Congrats:)

  • @ishanpandey2370
    @ishanpandey2370 4 ปีที่แล้ว +2

    In Person.js couldn't we just use props as parameter in the Person() and use {props.person.name} instead of what we have used

    • @munishgupta7878
      @munishgupta7878 4 ปีที่แล้ว

      Initially I was skeptical whether {props.person.name} will work or not, but it did. Glad to see someone else had the same thought.

  • @AAKSHAS
    @AAKSHAS 2 ปีที่แล้ว

    7:27 How to render list of objects with few properties? 9:19 Recommended Way

  • @crazyshorts4890
    @crazyshorts4890 6 หลายเดือนก่อน

    Small dobut sir , in map method in arrow function other than array name if we take any other name it shows the repetition of same statement, but if we take the same array name it is proper output as urs ,
    Can u clarify y this happene

  • @samvelpetrosyan494
    @samvelpetrosyan494 2 ปีที่แล้ว

    In this case coudn't we user forEach instead of map ?

  • @elkinbautista2172
    @elkinbautista2172 4 ปีที่แล้ว

    hi, do you have some tutorial of a RecyclerListView with defirebase users in React Native and Hooks????
    or could one explain?

  • @aninexclusive466
    @aninexclusive466 ปีที่แล้ว

    Why are you so Awesome?

  • @manvirsingh5381
    @manvirsingh5381 2 หลายเดือนก่อน

    do we have to import the Person component in the list.js in order to use that component in the list.js file ?

  • @user-qc7lr2sy5d
    @user-qc7lr2sy5d 5 ปีที่แล้ว

    What if I have saparate module file with array of objects with info. And I want to add something there like new object with info from input, or remove. So, I just use import to my component, but I can't change my module array, format is .js not json, but I can't do nothing with array from react =(
    What I should do?

  • @anas2004
    @anas2004 5 ปีที่แล้ว +1

    good job

  • @Baluga-kalamansi
    @Baluga-kalamansi 3 ปีที่แล้ว

    One clarity
    in Person.js why we are passing props argument in function as expression?
    function Person({person}) {
    In previous video we are not passing props as expression in function argument

    • @sakshambairathi6058
      @sakshambairathi6058 3 ปีที่แล้ว

      It's because Person.js is a new file and doesn't know what person variable is or what personName array is. So by providing the props in function and defining the same thing in the jsx tag we are passing the values of persons right from Namelist.js to Person.js

  • @abhishekp2752
    @abhishekp2752 ปีที่แล้ว

    how does array gets displayed inside jsx without looping (video time : 7:24) ?.