Build Modal Component With React

  Рет қаралды 18,554

Cand Dev

Cand Dev

Күн бұрын

Пікірлер: 18
@tgani96
@tgani96 4 жыл бұрын
sorry , wasted 25 min . Current Modal is totally not reusable due to you changing the opacity the actually it should not render in DOM and changing opacity means you can still select it even you dont see it , modal overlay should be inside the modal component not outside, you should consider using React Portal to make Modal bcs it will get position from closest relative and if u have element with relative position it will break all the behavior
@mohamedali9249
@mohamedali9249 2 жыл бұрын
Right, this is not the we work with modals , changing the opacity made it unusable
@codaid3121
@codaid3121 3 жыл бұрын
Super tuto. Just one thing, I think its better use the condition to show modal. Because even opacity its defined at 0, it always on screen. And it could be a problem if you use it in a component who people use the keyboard to navigate (press tab). If you use: const [show, setShow] = useState(false); { show && } For the performance its better. Sorry for my english 😉
@carloscardoso9383
@carloscardoso9383 4 жыл бұрын
Thanks Very Much. Helped me a lot. Great Job.
@moorzymoores
@moorzymoores 4 жыл бұрын
Superb tutorial. 5/5
@JoaoVictor-ye9vn
@JoaoVictor-ye9vn 4 жыл бұрын
hey man, ty from brazil, great job!!!
@CandDev
@CandDev 4 жыл бұрын
Obrigado😁
@ekeneidiagbor4678
@ekeneidiagbor4678 3 жыл бұрын
Thanks so much for this great content.
@iAmiina
@iAmiina 4 жыл бұрын
Thank you so much! So helpful
@markleodionisio2669
@markleodionisio2669 3 жыл бұрын
Thanks brothrr
@lekkyjayz6294
@lekkyjayz6294 Жыл бұрын
It seems the transition does not work when you close the modal. It closes faster than it opens. Why is that???
@davidernesto7912
@davidernesto7912 4 жыл бұрын
Tanks bro, it helps me a Lot
@zaritzki
@zaritzki 3 жыл бұрын
hello, do you have video if the modal is in another component?
@kanhaiyakmr
@kanhaiyakmr 4 жыл бұрын
thanks bro
@raselhossain8855
@raselhossain8855 3 жыл бұрын
If i click outside the model it's will be colse. How can i add this functionality?
@azure6320
@azure6320 4 жыл бұрын
Keren bang, saya mau nanya, itu modalnya ngambil space ga bang? Kan disana saya lihat ngubah opacity dari 1 ke 0. Jadi jika ada sebuah component atau misal h1 dibawah button open modal apa dia ngambil space sebesar modal?
@CandDev
@CandDev 4 жыл бұрын
dikasus ini ya ngambil space, tapi bisa diakalin dengan style css untuk .modal-wrapper ditambah position: absolute aja, dan diatur ke center component nya.
Modal in ReactJS - Code a React Modal Tutorial using Hooks
18:26
Learn React Portal In 12 Minutes By Building A Modal
12:11
Web Dev Simplified
Рет қаралды 240 М.
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 116 МЛН
This dad wins Halloween! 🎃💀
01:00
Justin Flom
Рет қаралды 67 МЛН
How to Add Dark Mode to Your React App | Styled Components
27:57
Is this the WORST CODE I've EVER SEEN? // Code Review
24:28
The Cherno
Рет қаралды 51 М.
Modal in Next.js & React | Create a Dialog Component
22:57
Dave Gray
Рет қаралды 33 М.
React Modal Tutorial Using Hooks and Styled Components
25:14
Brian Design
Рет қаралды 119 М.
Simple Frontend Pagination | React
19:13
Traversy Media
Рет қаралды 481 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 173 М.