Build a Reusable Modal Component Using Vue 3, The Composition API & Slots

  Рет қаралды 37,310

John Komarnicki

John Komarnicki

Күн бұрын

Пікірлер: 53
@hafizjavaid
@hafizjavaid 3 жыл бұрын
Yesterday, I was thinking where is my favorite KZbinr why he is not uploading new video and here it is Thank you man
@christopherokonkwo
@christopherokonkwo 2 жыл бұрын
You saved my day...there's nothing more beautiful than doing for yourself what you would have otherwise done with plugin. This way I caneasily adapt it to my project. Thanks a ton
@JohnKomarnicki
@JohnKomarnicki 2 жыл бұрын
That’s awesome, glad to hear this was helpful!
@quocbao6046
@quocbao6046 3 жыл бұрын
Thank you so much for the video. One of my favourite teachers on youtube. Keep up the great work.
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Thank you, Quõc!
@AnthonyJackman
@AnthonyJackman Жыл бұрын
You are awesome, @john!! I have looked all throughout github and various tutorials to not reinvent the wheel. No luck. All of the examples were too out of date (vue 2) or were using a css template which muddied the waters. Your video tut was on point! And it did not take me very long to transform it into a vue 3 tag! Please keep teaching.
@cjmaaz
@cjmaaz 3 жыл бұрын
Thanks for the video John! I suggest you to create shorts of some important part of the video just to please YT algorithm for the reach (in free time, don't overwork).
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
I’ll have to consider that! Thank you for the tip!
@frankkevy
@frankkevy 3 жыл бұрын
It's refreshing to explore a channel with tutorials using the latest versions of frameworks. Tired of Vue 2 tutorials everywhere
@lars-sorensen
@lars-sorensen 3 жыл бұрын
Love your Vue videos!
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Thank you Lars, I appreciate it!
@luukwagenaar4155
@luukwagenaar4155 3 жыл бұрын
Awesome video John. Very informative as always!
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Thanks Luuk!
@Deniafe
@Deniafe 3 жыл бұрын
You are awesome. Thanks for all the amazing contents and stunning projects.🤗
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Thank you, much appreciated 😄
@nishantsethi6625
@nishantsethi6625 2 жыл бұрын
ultimate tutorial, more than I required and best part is explaining the css. I did not know sass but thanks to you, i learnt a little now. but how to close modal if i move cursor outside the modal box?
@detresoltesz6112
@detresoltesz6112 2 жыл бұрын
Works very well, thank you very much!
@JohnKomarnicki
@JohnKomarnicki 2 жыл бұрын
Glad it helped!
@softblood1941
@softblood1941 3 жыл бұрын
I really want to see a full stack graphQL server with Vue and apollo client project and some more real world projects if you have time!!
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Definitely have some more bigger/practical projects coming up soon!
@agamurat3019
@agamurat3019 Жыл бұрын
very well explained, thank you
@ajjordi96
@ajjordi96 3 жыл бұрын
Awesome content John! Could you do the same for a responsive navbar? Firebase tutorials are great and not much content on Vue and Firebase around, I think that would be great too! Keep it up!
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
I do have a video on a responsive navigation menu using the options API. In the future, I could redo that using the options api! But I do have more videos with vue 3 and fire base coming up soon!
@LoveIyMan
@LoveIyMan 11 ай бұрын
You are exactly what I want
@mounir101
@mounir101 3 жыл бұрын
Thanks. John. I greatly appreciate your efforts. What does router history mode do?
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Thanks mounir! Here is a link to the Vue docs, which would probably do a much better job at explaining it then i could here! router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations
@mounir101
@mounir101 3 жыл бұрын
@@JohnKomarnicki Thanks again. John for the help.
@rafysancheztilogica8587
@rafysancheztilogica8587 Жыл бұрын
What extensions were you using ?
@sanghoonkim339
@sanghoonkim339 2 жыл бұрын
동영상강의 잘 시청하였습니다. 시간이 되신다면, slot 관련해서 강의를 하나 부탁드립니다. 감사합니다.
@veerendrasingh4258
@veerendrasingh4258 3 жыл бұрын
Hey thank you so much, I tried but was not able to understand how to open a modal component from parent component but you literally explained it in a minute. Keep doing good and stay healthy and happy PS: can you make a vue 3 project with script setup tag (composition api) and state management using vuex4 or Pinia whatever you prefer with tailwind it would be awesome
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Glad it could help! I'll have a slightly larger project out soon!
@dimjohn5878
@dimjohn5878 2 жыл бұрын
when i import the Modal to my parent component, the child component is shown in the script (Modal gets green) and not in the template (Modal is shown as plain text ). As a result i cant reuse the child component. Can someone help me plz
@DUNIACARA
@DUNIACARA 2 жыл бұрын
Thank you so much.
@JohnKomarnicki
@JohnKomarnicki 2 жыл бұрын
Thank you for watching!
@smgsmg7116
@smgsmg7116 3 жыл бұрын
Is it worth to learn Vue when I'm changing from backend to full frontend after two years? Not sure If I get a job with that framework, especially in Poland.
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Vue, in my opinion has the easiest learning curve coming from traditional/vanilla js compared to Angular or React. Vue, is certainly at the moment is not as popular as react, but it has been gaining momentum over the past several years. I personally enjoy it a lot, but everyone has different reasons/perspectives to choosing a framework. You'd have to evaluate the current job market within your area, then make your choice!
@smgsmg7116
@smgsmg7116 3 жыл бұрын
@@JohnKomarnicki Thanks for an answer.
@michal_stachura
@michal_stachura 3 жыл бұрын
This is very nice video Jan. I really like it. But two main imperfections can cause problems with this approach... or correct me if i'm wrong :) 1. Modal only emits close action and changing it's visibility is done in parent component. So as I understand, you will have to copy/paste "close" function in every component containing Modal 2. What if one component will have two (or more) different Modals?
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
1. Not exactly. The $emit function exists on modal component. Therefore, you'll just need to listen to the emit in the component where you are using that modal component. You would have to have a toggle function in each component you use, which is not uncommon to do. 2. There is a few things you can do here. Here is how i would do this, but there is other ways. You could just simply have two modals, and just created different data values hide/show modal. Such as "modal1" & "modal2", Now with this, you would have two different functions, or create a function that takes an argument to properly show / hide the correct modal. Hopefully that makes sense.
@kecoje
@kecoje 3 жыл бұрын
Thanks!
@gameeiei9842
@gameeiei9842 3 жыл бұрын
Can you make video about reusability composition api ? Ex: we have a form that include 2 fields(all fields are select - option). So, How can I split these 2 fields for reuse?
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Ah like a reusable input component?
@gameeiei9842
@gameeiei9842 3 жыл бұрын
@@JohnKomarnicki yes, but it has different methods
@frontendtutorials7821
@frontendtutorials7821 2 жыл бұрын
thank you
@JohnKomarnicki
@JohnKomarnicki 2 жыл бұрын
Your welcome!
@GergelyCsermely
@GergelyCsermely 3 жыл бұрын
Thanks
@mac2431
@mac2431 Жыл бұрын
i love you
@mahabubulhasan7827
@mahabubulhasan7827 3 жыл бұрын
Great content btw, the Github repo link is not working,
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
What is wrong with it? I just clicked on it, and it was working for me.
@JohnKomarnicki
@JohnKomarnicki 3 жыл бұрын
Sorry, it appears it was on private. It is on public now :)
@mahabubulhasan7827
@mahabubulhasan7827 3 жыл бұрын
@@JohnKomarnicki thanks 🙏
@stow1x
@stow1x 2 жыл бұрын
I prefer build modal without boolean v-model
@JohnKomarnicki
@JohnKomarnicki 2 жыл бұрын
I’m always up for different approaches, how would you do it?
Build a DropZone (Drag/Drop) Component With Vue 3 (No Library)
30:14
John Komarnicki
Рет қаралды 31 М.
A Better Way To Create Vue Components With Props Using TypeScript
12:40
Program With Erik
Рет қаралды 10 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Better Modals using Vue Teleport
5:24
Alexander Gekov
Рет қаралды 8 М.
Refactoring Vue 3 code | Reusable Form Component | Reusable Components
19:36
Responsive Navigation Component With Vue 3 & Vue Animations
35:34
John Komarnicki
Рет қаралды 58 М.
Build Phase : Portfolio w/ Nuxt 3
58:47
Eulier Gonzalez
Рет қаралды 324
Props and Emitters in Vue 3 (FULL TUTORIAL)
14:53
VueReference
Рет қаралды 18 М.
Create a modal with Vue JS
25:22
Coding with Samanja
Рет қаралды 1,2 М.
Vue Slots Simplified
7:25
LearnVue
Рет қаралды 57 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН