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
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.
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?
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?
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..
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.
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!
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?
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
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 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 :/
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";
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
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.
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!
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.
Quick! Clear! Concise! An excellent tutorial, my friend!
I dont usually comment on yt tutorials, but this is the only modal video I felt useful. Thankyou!
I was looking something like this to insert into my project, Merci infiniment monsieur pour cette contribution. Vous etes magnifique!
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
Thank you, you explained it so simply! Also, your accent is very cool :D
Glad it helps !
The French accent never leaves ✌️
really, i'm so happy to hear you again, i usually cach your french tutorials, this modal is all i wanted 🙏👌👌
Best modal video on youtube (or at least out of like 10 that I compared it with).
This is exactly what I was looking for. Keep the good work going mate!
Beautifully done... Using basic concepts, in a Clear and concise way bro
Straight to the point. Perfect! You just got a follower.
You are superb!!! easily discuss and understandable code. Thank you so much.
Great quick & clear explanation! Thanks!
Thanks for this video, really nice and simple explanation
Glad it helps, and nice pic in front of the Hungarian Parliament mate ✔️
It is very helpful video for building Modal using Vanilla CSS. Thanks.
I have been referencing to this video many times, thanks man
Thankyou so much brother i was suffering from so many problems thankyou so much...😢
Very easy tutorial, thanks for the source code!
Thanks, just what I was looking for ! Very Helpful.
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.
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?
good tutorial, but how can You animate this modal? Especially closing modal?
iam always scared to code an overlay but this video literally helped me in 5 mins
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?
Wow même en anglais j'ai reconnu ta voix direct 😂 Je savais pas que tu avais une autre chaine
Please how do you enable intellisense like when you did div.modal
As always, great work. Straight to the point
how do you run that modal.js on terminal?
be cause i use npm start but i can't start it
Nice Tutorial Sir . Quick And clear
Very simple and easy method
Thanks for motivation
I appreciate ✌️
so which is the best method, using portals or using this approach?
Help, i have the exact same code and modal is not showing :s
Source code is in the description my friend
I have a target value to display but when i click submit the value no longer display. What can i do?
An excellent tutorial! Thank you so much.
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.
nevermind I'm stupid,I added it to the modal-content section not in the '.modal' section,now it works!
Any way to make it so that it fades in and out smoothly?
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.
how can we delay the pop up message by a few milliseconds?
Thanks. That is exactly what i was looking for. A Point of Reference
Great 🔥
This helped me a lot. How can I make the content of my modal scrollable? (I have a photo gallery in the modal)
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..
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.
so short and so clear Im Arabian but I understood so much thx bro
short & clear ! thank u so much for that
Thanks bro it was really useful 👍👍👍
WOW!! Thank you so much from S.Korea!!
On clicking Open button, the modal is not opening. Can anyone please suggest?
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!
mine too not working
Dude, this is so nice
Thank you for the easiest explanation!!
Thank you, the tutorial is really clear! Just what I need.
Glad to help
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?
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
wow!! you made creating modal so simple!!
wow u made this super easy tho
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/';"
This is mainly a problem with the path, check the name of your paths
@@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 :/
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";
So simply, thank you dude
how can we do it on onload
Thank you so much, the tutorial is really clear
Very good tutorial, thank you ^^
Thank you, keep up the good work
thanks man, really nice n cool to implement
0:29 and we are going to fk us
why do u say 'hoviley' insted of overlay
Thank
You It's working!
This is great!! thank you so much
Really helpful...! Thank you
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
Great tutorial!
👍👍
Source Code Please
Super helpful thanks!
not working now :((
Thanks so much. You saved me
Excellent one. Thanks.
Excellent Example
Nice tutorial man!
You're amazing
Thankyou for your help
Nice video, thank you!
Thanks for this.
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.
Thanks, We speak English here :)
thank you my friend
Wow man it's very Cool
gracias perritoo sos crkack
Great video ! :)
Contact me
it's really cool
Thank You! ☺☺
thank you so much bro bro
❤️❤️❤️❤️
Thank you
Thanks a lot!
Sweet french accent
Thanks 👍
Thanks .
Top!👍
Great
красава
there are 4 big mistakes. how dare u upload a video. u are junior level
what is this heavy accent. it is hard to listen . ufff so bad.
Thank you so much
Thank you!