Create a modal with React (Pop-up)

Поделиться
HTML-код
  • Опубликовано: 15 май 2021
  • Source code : github.com/Ziratsu/React-moda...
  • НаукаНаука

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

  • @streetrat7050
    @streetrat7050 2 года назад +10

    Thank you so much for your contribution. I have spent far too long now trying to find an example that is simple, direct and to the point.

  • @TJA91910
    @TJA91910 8 месяцев назад +4

    I've referenced this video countless times for a variety of projects. Thank you for taking the time to put this together, you are a true hero!

  • @jameslovell5201
    @jameslovell5201 2 года назад +29

    Quick! Clear! Concise! An excellent tutorial, my friend!

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

    This is exactly what I was looking for. Keep the good work going mate!

  • @ghislainmitahi2584
    @ghislainmitahi2584 2 года назад +1

    really, i'm so happy to hear you again, i usually cach your french tutorials, this modal is all i wanted 🙏👌👌

  • @kamichikora6035
    @kamichikora6035 2 года назад

    As always, great work. Straight to the point

  • @lightsabercatspowpow
    @lightsabercatspowpow 11 месяцев назад +1

    Very very great video. You simplified this down to clean concise code that was very easy to follow. The css styling being done ahead of time helps a lot aswell because this video was how to make it work not how to make it pretty so thanks for getting that done outside the actual content!
    10/10

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

    Beautifully done... Using basic concepts, in a Clear and concise way bro

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

    I dont usually comment on yt tutorials, but this is the only modal video I felt useful. Thankyou!

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

    Straight to the point. Perfect! You just got a follower.

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

    You are superb!!! easily discuss and understandable code. Thank you so much.

  • @MrACrazyHobo
    @MrACrazyHobo 2 года назад +2

    Very easy tutorial, thanks for the source code!

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

    I have been referencing to this video many times, thanks man

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

    Thanks, just what I was looking for ! Very Helpful.

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

    short & clear ! thank u so much for that

  • @juelmapereira4277
    @juelmapereira4277 3 месяца назад

    Dude, this is so nice

  • @alienfunbug
    @alienfunbug 2 года назад +1

    Best modal video on youtube (or at least out of like 10 that I compared it with).

  • @User-nn9uw
    @User-nn9uw 2 года назад

    So simply, thank you dude

  • @danielmarx1056
    @danielmarx1056 3 года назад +2

    Thanks for this video, really nice and simple explanation

    • @TheWebSchool
      @TheWebSchool  3 года назад

      Glad it helps, and nice pic in front of the Hungarian Parliament mate ✔️

  • @polestudiosaroundtheworld
    @polestudiosaroundtheworld 3 года назад

    Thank you, the tutorial is really clear! Just what I need.

  • @azashik5678
    @azashik5678 2 года назад

    Nice Tutorial Sir . Quick And clear

  • @ABC-el3ql
    @ABC-el3ql 2 года назад

    WOW!! Thank you so much from S.Korea!!

  • @eskimo6097
    @eskimo6097 3 года назад +1

    Thank you, you explained it so simply! Also, your accent is very cool :D

    • @TheWebSchool
      @TheWebSchool  3 года назад

      Glad it helps !
      The French accent never leaves ✌️

  • @ashwinpatidar2878
    @ashwinpatidar2878 10 месяцев назад

    It is very helpful video for building Modal using Vanilla CSS. Thanks.

  • @samriddhabajpai1846
    @samriddhabajpai1846 2 года назад

    Thank you for the easiest explanation!!

  • @souravdutta5703
    @souravdutta5703 2 года назад

    wow!! you made creating modal so simple!!

  • @Greenlight123
    @Greenlight123 3 года назад

    Thanks. That is exactly what i was looking for. A Point of Reference

  • @BBoyXy
    @BBoyXy 2 года назад

    Thank you, keep up the good work

  • @younesmansourbokhtache118
    @younesmansourbokhtache118 2 года назад

    Thank you so much, the tutorial is really clear

  • @muhammadjonortigaliyev3002
    @muhammadjonortigaliyev3002 4 месяца назад

    Thanks bro it was really useful 👍👍👍

  • @herbertrichard4561
    @herbertrichard4561 3 месяца назад

    Very good tutorial, thank you ^^

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

    You're amazing

  • @0xBK201
    @0xBK201 Год назад

    Thanks for this.

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

    This is great!! thank you so much

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

    Excellent Example

  • @kamamedia3535
    @kamamedia3535 2 года назад

    thanks man, really nice n cool to implement

  • @prasathj7436
    @prasathj7436 10 месяцев назад

    Excellent one. Thanks.

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

    iam always scared to code an overlay but this video literally helped me in 5 mins

  • @ziyaulrana1840
    @ziyaulrana1840 3 года назад

    Very simple and easy method
    Thanks for motivation

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

    wow u made this super easy tho

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

    Thankyou for your help

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

    thank you my friend

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

    gracias perritoo sos crkack

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

    This helped me a lot. How can I make the content of my modal scrollable? (I have a photo gallery in the modal)

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

    Nice video, thank you!

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

    Thanks so much. You saved me

  • @gooddeveloper
    @gooddeveloper 3 месяца назад

    it's really cool

  • @ashadulmridha4265
    @ashadulmridha4265 2 года назад

    Wow man it's very Cool

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

    Nice tutorial man!

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

    Wow même en anglais j'ai reconnu ta voix direct 😂 Je savais pas que tu avais une autre chaine

  • @s1sko7
    @s1sko7 10 месяцев назад

    Excellent!! :)
    But 2 things :
    1 ) Why bother with State when you can just pass an "active-modal" class to body and handle everything with CSS?
    2) Studies shows that a lot of people would click on the previous button of their browser when modal shows up. So we should prevent that maybe with a new page direction.
    Thoughts?

  • @mohammedhassan-xc7nh
    @mohammedhassan-xc7nh Год назад

    so short and so clear Im Arabian but I understood so much thx bro

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

    good tutorial, but how can You animate this modal? Especially closing modal?

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

    Thank you!

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

    Thank you so much

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

    Thanks a lot!

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

    Great, quick tutorial for building modals however doesn't address event propagation. I build a form inside a modal and on click it closes the form.

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

    Thank you!!!

  • @DS-qz2gu
    @DS-qz2gu 5 месяцев назад

    When I learned React, I learned that when you modify the current state to set a new state (e.g., negating a value to toggle boolean state), there’s a specific syntax to ensure that you get the current state instead of risking using a previous version of the state. Instead of this:
    setModal(!modal);
    You’d use this:
    setModal((prevModal) => !prevModal);
    Is this true? Is it just not important in this use case?

  • @fola_azeez
    @fola_azeez 2 дня назад

    thank you so much bro bro

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

    An excellent tutorial! Thank you so much.

  • @nagireddypanditi6429
    @nagireddypanditi6429 3 года назад +1

    Great tutorial!

  • @attilakovacs4364
    @attilakovacs4364 2 года назад

    ty great video,one question though,how do I enable scrolling in the modal? I added overflow-y: auto or scroll but it doesnt work.

    • @attilakovacs4364
      @attilakovacs4364 2 года назад +1

      nevermind I'm stupid,I added it to the modal-content section not in the '.modal' section,now it works!

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

    Thank you

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

    Ok the problem is what if my modal bigger height then viewport?
    overflow-y: scroll; doesn't help because it has different scroll and scrolls much slower
    then body scroll.

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

    so which is the best method, using portals or using this approach?

  • @nischithr5428
    @nischithr5428 2 года назад

    Thank You! ☺☺

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

    Any way to make it so that it fades in and out smoothly?

  • @dev_catM
    @dev_catM 2 года назад

    Top!👍

  • @worldclasscode1847
    @worldclasscode1847 2 года назад

    Great video ! :)

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

    Thanks .

  • @khan.hassan
    @khan.hassan 2 года назад

    Thanks 👍

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

    how do you run that modal.js on terminal?
    be cause i use npm start but i can't start it

  • @augischadiegils.5109
    @augischadiegils.5109 2 года назад

    ❤️❤️❤️❤️

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

    how can we delay the pop up message by a few milliseconds?

  • @sandeepdhungana6657
    @sandeepdhungana6657 2 года назад

    Great

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

    I have a target value to display but when i click submit the value no longer display. What can i do?

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

    thank you it is what i want to know how to create a modal that is shown when i login my bank account. it contains points that turn and text please wait before showin my bank receipt

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

    On clicking Open button, the modal is not opening. Can anyone please suggest?

  • @korkut31
    @korkut31 4 месяца назад

    why do u say 'hoviley' insted of overlay

  • @ambitionhut
    @ambitionhut 2 года назад

    This doesent work sadly on my end. The idea of creating both the button and modal in the same component only works if its like you example. But what if the button is on the navbar? when I do it, the modal pops up inside the navbar..

    • @TheWebSchool
      @TheWebSchool  2 года назад

      Hey, yeah it was for the purpose of the video.
      Most of the time we use the context API or redux or whatever state manager to handle the triggering of a modal.

  • @mega.pe4enka147
    @mega.pe4enka147 2 года назад

    красава

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

    how can we do it on onload

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

    I downloaded the project and copied the components file and put it into my SRC file, and imported it the same way into my app.js, I couldn't get it to work. Please help!

  • @gilbertorogel81
    @gilbertorogel81 2 года назад +1

    Help, i have the exact same code and modal is not showing :s

    • @TheWebSchool
      @TheWebSchool  2 года назад

      Source code is in the description my friend

  • @matiasrocca4702
    @matiasrocca4702 2 года назад

    Hey!! Im having trouble with the overlay toggle on the overlay div. It is also executing the function when clicking inside the popup component (which kinda makes sense, since the component is within the overlay div). Does anybody know how may I fix this?

    • @matiasrocca4702
      @matiasrocca4702 2 года назад

      Im not being able to call the function only while clicking the overlay (outside part of the box), im also calling it when clicking on the inside. This is a problem, because im trying to fill a form inside the component

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

    not working now :((

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

    Source Code Please

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

    Sweet french accent

  • @julienchmelnik2558
    @julienchmelnik2558 2 года назад

    How can i fix this error:
    "./src/App.js
    Module not found: Can't resolve './Components/Modal/Modal' in 'C:\Users\user\Desktop\Test\Test\src'"
    i use this import:
    "import Modal from './Components/Modal/';"

    • @TheWebSchool
      @TheWebSchool  2 года назад

      This is mainly a problem with the path, check the name of your paths

    • @julienchmelnik2558
      @julienchmelnik2558 2 года назад

      @@TheWebSchool Maybe i dont understand bcs im kinda new to do programming. I use a relative path, it should be okay then or not?
      Actually i have no clue how to fix this :/

    • @hamidrezarahimi6651
      @hamidrezarahimi6651 2 года назад

      If your folders structure is the same as what was explained in the video, you should add the Component file to your import statement as well. With that being said, you have to update your import to:
      import Modal from "./Components/Modal/Modal";

  • @EminoMeneko
    @EminoMeneko 2 года назад

    Super bien expliqué mais chez moi ça ne crée pas la modale.
    React dev tools me permet de voir que le state toggle mais rien ne s'affiche.
    En fait c'est parce que je part des templates depuis le site de Bootstrap et que le code ne marche pas tout à fait de la même manière.
    En tout cas ça a répondu à la question que je me posais.

    • @TheWebSchool
      @TheWebSchool  2 года назад

      Thanks, We speak English here :)

  • @korkut31
    @korkut31 4 месяца назад

    there are 4 big mistakes. how dare u upload a video. u are junior level

  • @korkut31
    @korkut31 4 месяца назад

    what is this heavy accent. it is hard to listen . ufff so bad.