Build a React Accordion from Scratch | ReactJS tutorial

Sdílet
Vložit
  • čas přidán 2. 12. 2020
  • Learn how to build an accordion in ReactJS. We'll go through and demonstrate piece by piece how to put together an accordion.
    💛 Be sure to comment like and subscribe to the channel! I have plenty more videos: / @thetechteam

Komentáře • 93

  • @aarongarcia2433
    @aarongarcia2433 Před 2 lety +2

    Thank you so much! Of all the tutorials, articles, and codepens I searched through, this is the only one that worked in my case.

  • @gabrielobafisile2299
    @gabrielobafisile2299 Před rokem +1

    I love the way you simplified this. Thanks bro

  • @RizaHariati
    @RizaHariati Před 2 lety +1

    Very simple to the point explanation. Thank you

  • @autumn4421
    @autumn4421 Před 8 měsíci

    Simple, cool, effective and that's only the way which i could use
    Thank you so much!

  • @maxaquilino7264
    @maxaquilino7264 Před 2 lety

    Excellent stuff, well done!

  • @CKNMEDIA
    @CKNMEDIA Před 2 lety

    Excellent stuff. Its working. 🔥🔥

  • @whysoserious-yj1ku
    @whysoserious-yj1ku Před 2 lety

    Thank you! Dont know about the other comments.. i am working in Functional Components and this works like a charm

  • @InteligenciaEficiente
    @InteligenciaEficiente Před 2 lety

    Great! will use this logic on my project, thank you!!

  • @ydub18
    @ydub18 Před rokem

    Perfect explanation. Thank you!

  • @todortodorov9240
    @todortodorov9240 Před rokem

    Simple and effective. Thank you.

  • @vladko9623
    @vladko9623 Před rokem

    Thank you so much. You have helped me! )

  • @joepilibi
    @joepilibi Před rokem

    Simple and efficient, nice !

  • @mahidharreddy8371
    @mahidharreddy8371 Před 2 lety

    Thank You bro. .. You just saved my Day..

  • @growthrough2123
    @growthrough2123 Před rokem +8

    at minute 7:42 there are some styles added that the presenter doesn't talk about! Unless I missed it... He adds some styles to .content and then adds .content.show

    • @shaksham.22
      @shaksham.22 Před 4 měsíci

      i was wondering about the ame

  • @joecolas
    @joecolas Před 2 lety

    Thank you so much . this is very helpful

  • @rasulakhundov500
    @rasulakhundov500 Před 2 lety

    Thank you so much. So good tutorial

  • @pesahson
    @pesahson Před 3 lety +8

    Looks really good. That transition makes it work super cool.

    • @prathmeshkalehere
      @prathmeshkalehere Před rokem

      I did it all step by step but I can't seem to get transition effect on it

    • @artanme
      @artanme Před rokem

      @@prathmeshkalehere same, i even tried using chatgpt to help me, but it doesn't work

  • @velloss
    @velloss Před 3 lety +1

    helped me a lot, thankssssssss

  • @ainneo
    @ainneo Před 2 lety

    amazing!!!!! thank you!

  • @JenniferThomas-wz2qu
    @JenniferThomas-wz2qu Před měsícem

    Very cool, thanks

  • @dailyshorts723
    @dailyshorts723 Před 2 lety

    great work bro

  • @kelsola
    @kelsola Před 2 lety

    Prior to this video, I used an NPM package for my Accordion, but I caught a bug that couldn't be fixed and made no sense (over 5 hours wasted), so I knew I needed to build one from scratch. After watching your video, probably 45 minutes later, my "from scratch" Accordion is working perfectly. So thank you very much.

    • @a.human.
      @a.human. Před 2 lety +1

      I feel you. I wasted my entire day today trying to fix a bug related to react slick. I finally got rid of it and built a carousel myself. Still, so much left to do today... I'm tired.

    • @kelsola
      @kelsola Před 2 lety +1

      @@a.human. Yeah, working with packages can be a real pain in the butt when trying to fix undesired behaviors. I know that all too well from working with Rich Text Editors...

  • @yehch989
    @yehch989 Před 3 měsíci

    Thank you so much!

  • @andreporto7451
    @andreporto7451 Před rokem

    very good, man!

  • @missionmaths3867
    @missionmaths3867 Před rokem

    Thankyou you are a great teacher

  • @kishorkumarsoni
    @kishorkumarsoni Před 3 lety +1

    Thanks sir. Awasome..👌

  • @user-ks9zc3bi2p
    @user-ks9zc3bi2p Před 3 měsíci

    perfect thank you bro

  • @LeGabrieell
    @LeGabrieell Před rokem

    Thank you so much!!

  • @Dwedari
    @Dwedari Před 2 lety

    Really appreciate it

  • @GamingDotaRagdoll
    @GamingDotaRagdoll Před rokem

    Thank you, Sir!

  • @Netik-AbonneToi59
    @Netik-AbonneToi59 Před 7 měsíci

    Thank you bro !

  • @visheshkumar8015
    @visheshkumar8015 Před 11 měsíci

    kept simple and well explained

  • @youhavetodoit9070
    @youhavetodoit9070 Před rokem +1

    Thank You So Much

  • @mazhabshosolihov1122
    @mazhabshosolihov1122 Před rokem +1

    Thanks bro

  • @NguyenDat-ee8kv
    @NguyenDat-ee8kv Před rokem

    Thank u bro i made it

  • @Bhartiya_ekta
    @Bhartiya_ekta Před 6 měsíci

    Thanks a lot 🎉

  • @abdullahjaved2044
    @abdullahjaved2044 Před rokem

    Thanks Alot❤❤

  • @kirillpavlovskii8342
    @kirillpavlovskii8342 Před 2 lety

    Great, thanks

  • @shadowrebels1623
    @shadowrebels1623 Před 19 dny

    thank you !!!!

  • @MariaFerraro
    @MariaFerraro Před rokem

    Thank you!!!!

  • @alexeysedov278
    @alexeysedov278 Před rokem

    thank you!

  • @absoluteagency4306
    @absoluteagency4306 Před 3 lety +1

    Awesome and simple , thanks

  • @michellephoebe
    @michellephoebe Před rokem

    I have been having issues with React accordions cause the packages make the documentation bigger.
    This is the best! Thank you!
    Do you have a tutorial on nested accordion?

  • @shalombloodman1009
    @shalombloodman1009 Před 2 lety +3

    the reason one would find trouble with the code is because it was made directly in the app.js file, you have to destructure it yourself and he said so in the video.

  • @shaksham.22
    @shaksham.22 Před 4 měsíci +1

    If anyone doesnt understand why the stuffs get hidden at 7:34 then its because he adds another class content.show to it (see at 13:42) where content class hides the answers and content.show reveals it

  • @Scream-ne3np
    @Scream-ne3np Před 2 lety

    good job

  • @ViKiNG_89
    @ViKiNG_89 Před 2 lety

    Thanks )

  • @kalahari8295
    @kalahari8295 Před 2 lety

    Best 🔥

  • @RizaGunturPrakoso
    @RizaGunturPrakoso Před 2 lety +6

    after you set flex and center suddenly answer hidden, why is that?

    • @XxSouIxX
      @XxSouIxX Před 2 lety +6

      He added "max-height: 0" and "overflow: hidden" to the 'content' class off-screen, apparently.

    • @limitlessmedow4682
      @limitlessmedow4682 Před rokem

      @@XxSouIxX wow thanks I was asking myself that same question

    • @codenamemoe9337
      @codenamemoe9337 Před rokem

      @@XxSouIxX Thank you, I was thinking the same thing.

    • @manitripathi9463
      @manitripathi9463 Před rokem

      czcams.com/video/XtkIFwQkacQ/video.html

  • @dorocodes7280
    @dorocodes7280 Před rokem +1

    would be awesome to publish the code and add a link to it in the video description

  • @DuckYou25
    @DuckYou25 Před 2 lety +1

    code works thanks, i dont what these dudes are saying

  • @sagarmisra6932
    @sagarmisra6932 Před 3 lety

    Not working with class component, any reference??

  • @prathmeshkalehere
    @prathmeshkalehere Před rokem +1

    I did it all step by step but I can't seem to get transition effect on it

  • @mohammadmahdialvansaz8001

    thanks

  • @harshithakapa8019
    @harshithakapa8019 Před 2 lety +1

    @the tech team can u plz share the code?

  • @kangegha
    @kangegha Před 2 lety +2

    what is the 'i' in the toggle function? 'index'? I got error saying that 'i' is indefined...

    • @kalahari8295
      @kalahari8295 Před 2 lety +2

      I is referring to a specific item index

  • @ImperioTeixeira
    @ImperioTeixeira Před rokem

    hi, very good video, I have a question though, can we use bootstrap accordion in react and to do the same thing you did?

  • @twistekk7
    @twistekk7 Před rokem

    where to get this lorem ipsum text?

  • @sunitajoshi-we7cn
    @sunitajoshi-we7cn Před rokem

    Where i can get the code

  • @brandon400
    @brandon400 Před 2 lety

    it helps me. thx
    how can i unselect an item?

    • @Paulluskelvin
      @Paulluskelvin Před rokem

      Add the else keyword just after your if statement.
      As in else setSelected(i);

  • @thokozanichisembele8877

    shout you out brudda

  • @MrBuloy11
    @MrBuloy11 Před 11 měsíci

    it is good but needs to fix the shaking part, every time it is toggle.

  • @netsaosa4973
    @netsaosa4973 Před rokem

    epic

  • @marketingstudio16
    @marketingstudio16 Před 11 měsíci

    source code? sound quality?

  • @usamabintahir8284
    @usamabintahir8284 Před 3 lety +2

    code available?

  • @temirov6411
    @temirov6411 Před 2 lety +1

    'i' is not defined no-undef

    • @MrLefteris3000
      @MrLefteris3000 Před rokem +2

      too late propably but did you manage to find what was wrong?

    • @Paulluskelvin
      @Paulluskelvin Před rokem

      Your map should receive at least two arguments. You probably didn't define it there.

  • @blesintotv1803
    @blesintotv1803 Před 3 měsíci

    i is not defined

  • @user-ml4ux7lp1s
    @user-ml4ux7lp1s Před 11 měsíci

    i have not worked

  • @marvellousadesanya8480

    volume extremely low.

  • @Codingkite
    @Codingkite Před 3 lety

    no working

  • @theroastingershow161
    @theroastingershow161 Před 3 lety +1

    not working properly

  • @Codingkite
    @Codingkite Před 3 lety

    time visit my two hour😡 not working class

  • @orangelimesky
    @orangelimesky Před měsícem

    Garbage. He doesn't explain anything about the css involved

  • @Codingkite
    @Codingkite Před 3 lety +1

    fake video

  • @viog8421
    @viog8421 Před 9 měsíci

    Gracias, fue muy útil

  • @temirov6411
    @temirov6411 Před 2 lety

    time visit my two hour😡 not working class