Please Like, Share, Subscribe & Comment - it all helps me create more content for you! 👉 Vue 3 Composition API Course: dannys.link/compositionapi 👉 My Courses: dannys.link/courses 👉 Download Fudget: www.fudget.com 👉 My VSCode Setup: dannys.link/vscodesetup 👉 DONT CLICK THIS: dannys.link/dontclick
@VolkunSports Жыл бұрын
you nailed the concept when masked the code for clarity.
@MakeAppswithDanny Жыл бұрын
Thanks 👍
@aspirinemaga2 жыл бұрын
In Vue 1 and 2 we've learned how to properly distribute and have organized chunks of code across the SFC (.vue). In Vue3 Composition API we are trying to forget about that and smash them together. Simplicity and well organized code was the root why I stayed with vue when it was 0.1v
@evolutionx12 жыл бұрын
Options should be the default and Composition only used for rare cases where you can't do it with Options.
@aspirinemaga2 жыл бұрын
@@evolutionx1 that's absolutely right. I should be glad for still being able to use options api in vue3 anyway
@MakeAppswithDanny2 жыл бұрын
@@aspirinemaga good points guys. I felt the same way at first. I really didn’t like Composition API at first. But after spending 12 months working on a complicated app with it, I will NEVER go back 👍
@stefanonesi87122 жыл бұрын
@@MakeAppswithDanny I'm still in the stage where i hate composition API. But, i know that i'll eventually switch to Composition anytime soon, and convert options to composition is really boring, so...
@MakeAppswithDanny2 жыл бұрын
@@stefanonesi8712 Check out my Vue 3 Composition API series it might change your mind: kzbin.info/aero/PLAiDzIdBfy8jr-ccMU8ymPn7o85RAZ_6T
@davidpile25762 жыл бұрын
Thanks Danny. Nice little into to composables
@MakeAppswithDanny2 жыл бұрын
Thanks David!
@medslk975310 ай бұрын
thank you , you explained the concept really well
@MakeAppswithDanny10 ай бұрын
You're welcome 👍
@0-Will-02 жыл бұрын
Really nice demo of why composition api is worth using.
@MakeAppswithDanny2 жыл бұрын
Thanks Will. Yeah I thought it was needed. I haven’t seen a good explanation of why the flip I should switch to it anywhere. It’s only through using it to create a complex app that I finally see the benefits 👍
@dekebaoe2 жыл бұрын
Awesome as always, 👍 Thank you Danny
@MakeAppswithDanny2 жыл бұрын
Thanks Basar! 👍
@universecode11012 жыл бұрын
The composition Api is a game changer for Vue.js 🔥 Nice Danny ✌🏻
@MakeAppswithDanny2 жыл бұрын
Definitely. Especially since Script Setup! 👍
@CyrilViXP13 күн бұрын
Fixes the problem that never existed
@Huntmare2 жыл бұрын
Thank you for the video, great as always ! love your courses also !!
@MakeAppswithDanny2 жыл бұрын
Thanks a z! 👍
@nickoquiamco9782 жыл бұрын
does the composition API and options API have a difference in terms of performance ?
@MakeAppswithDanny2 жыл бұрын
I’m not sure, but the the Vue 3 codebase has some indications that it’s more optimised for Composition API than Options API. I talked about this in one of my other videos 👍
@jofftiquez Жыл бұрын
I'm a bit iffy about the multiple onMounted hooks, wouldn't it be weird that way? I mean I'm totally down for it if it is, I just don't know if it's "normal" thanks.
@MakeAppswithDanny Жыл бұрын
It's up to you. You can have a single onMounted if you like, and put all your logic in there. Or use multiple, to separate concers.
@dipanshu22072 жыл бұрын
great video! One question, why would you want to use a state management system like Pinia when simply using a composable/composition api state management? I had built a small app, which I used the composition apis state system and its easy and intuitive to work with, I have no experience with Pinia but for my purpose, I never really felt I needed a separate state management system, so in what cases I might want to use it?
@bartduisters34552 жыл бұрын
If you want a similar approach to what you have been using, but also want Vue Devtools integration. Which allows for 'time traveling', which means you can see what your frontend looks like with different states. It also allows you to edit the state directly from the plugin and see the result live. If you have a small application and feel no need for the Vue Devtools functionality, you are probably just fine with the composition approach.
@MakeAppswithDanny2 жыл бұрын
Yes like Bart said. The only real benefit is debugging capabilities (via Vue Devtools) 👍!
@dipanshu22072 жыл бұрын
Great, thanks guys
@CCDevYt2 жыл бұрын
Danny if you would not mind. Make a informational video about Vue Router 4 too. Thank u :)
@MakeAppswithDanny2 жыл бұрын
I will be covering Vue Router 4 in the full course, Clint! And also a bit here on KZbin. 👍
@Viktorres1 Жыл бұрын
Thanks Danny from your Udemy student)
@MakeAppswithDanny Жыл бұрын
My pleasure!
@saeed172 жыл бұрын
Thanks for the clear, concise explanation and easy-to-follow examples.
@MakeAppswithDanny2 жыл бұрын
Thanks Saeed!
@eberguerra300210 ай бұрын
Siento que los composables aumentan la cantidad de archivos, y si se reducen en un archivo pero al final van a crecer en otros, la manera en la que estaban antes estructurados tenía un enfoque donde sabias donde podía encontrar todo, no se no me gusta mucho el nuevo estilo 😅
@MakeAppswithDanny10 ай бұрын
Ése es un punto razonable. 👍
@bobobobo-ki2fw Жыл бұрын
Thank you.
@MakeAppswithDanny Жыл бұрын
You're welcome!
@hakimov_dev2 жыл бұрын
Awesome bro )
@MakeAppswithDanny2 жыл бұрын
Thanks Hakimov!
@tanzimibthesam58612 жыл бұрын
Will course be available at Udemy?
@MakeAppswithDanny2 жыл бұрын
Yes it will Tanzim
@FloodGold2 жыл бұрын
Okay hurry up ha just kidding - I'll get anything you create whenever you make it available.
@MakeAppswithDanny2 жыл бұрын
@@FloodGold haha. Keep an eye on KZbin today around 12pm 👍
@TyronC199 Жыл бұрын
Sold
@MakeAppswithDanny Жыл бұрын
Me too! 👍
@salva-dev2 жыл бұрын
Thanks for your videos (and your great courses) , Danny. This video has made me think that maybe we should also use Composition API in vue 2 (and quasar v1) developments in my team in order to migrate easily (we're going to migrate to vue 3 but we must support IE11 this year 😓 ) . Do you think the same?
@MakeAppswithDanny2 жыл бұрын
I don't know, I guess you need to look at how long it would take to switch over, and whether it's financially worthwhile at this point. But if time & money are not obstacles, I would say go for it 👍
@punithgowda67232 жыл бұрын
Cool
@MakeAppswithDanny2 жыл бұрын
Thanks Punith!
@bharathhs11617 ай бұрын
Always options api
@Tarabass Жыл бұрын
Only opinion. What about performance, testing, migration, schooling.
@adriatic123 Жыл бұрын
Options API is not RIP but well and prospering. Composition API is a fad, syntactic sugar without a single benefit (for example in code execution speed and size). More and more programmers realize that, while they are forced by their managers to be 'more modern'. I immediately know that such manager doesn't have the basic knowledge about Vue.
@MrBotv00912 жыл бұрын
Danny, you look tired. Take care of yourself. Thx 4 info.
@MakeAppswithDanny2 жыл бұрын
Yeah not been sleeping much lately. Been going through a separation while recording this course … 🙁
@flogginga_dead_horse40222 жыл бұрын
@@MakeAppswithDanny sorry to hear that!! I know what you mean!!
@MrBotv00912 жыл бұрын
@@MakeAppswithDanny This one sucks. Hold on, bro, your students are with you!
@alexlytle0892 жыл бұрын
I personally prefer the options API. Its simple easy to use
@MakeAppswithDanny2 жыл бұрын
I know what you mean, Alex. I felt the same way for a long time. Look out for my Composition API series starting very soon. It may just change your mind a little bit 👍
@alexlytle0892 жыл бұрын
@@MakeAppswithDanny Thanks Danny looking forward to it.
@James-li8cm7 ай бұрын
this honestly looks more complicated... the only good thing it does is allow you to block your code out... my recommendation instead is: make smaller components use service classes for reusable code.
@hakimov_dev2 жыл бұрын
First like me )
@MakeAppswithDanny2 жыл бұрын
😂
@UwU-dx5hu6 күн бұрын
This looks a lot like react😂
@MakeAppswithDanny6 күн бұрын
Does it? 👍
@flogginga_dead_horse40222 жыл бұрын
one of a few things that ruined Vue for me...
@MakeAppswithDanny2 жыл бұрын
😂 I know right. I HATED Composition API for a while. It really annoyed me. Love it now though, after creating a big app with it 👍
@flogginga_dead_horse40222 жыл бұрын
@@MakeAppswithDanny I don't like all the "refs" and such. Also have a big application that used BootstrapVue and that project died at version 2. Even Vuetify still doesn't work with 3, luckily Quasar does!!!
@flogginga_dead_horse40222 жыл бұрын
@@MakeAppswithDanny Hello, I just wanted to revisit this comment. I totally hated composition even after reading many things about it and looking at other training. After going half way through your Udemy class you have totally changed my mind!! I never saw it compared so well to options. It really does scale better. On the other hand it's like a completely different version of Vue and it's like starting over. I wish this was how it was done to begin with. Also I have a large project using Vuex and to have Pinia suddenly be the best practice is kind of annoying. Some of the decisions Evan makes have really messed up my projects. Another example is VueCLI and UI seemed like a really good way to manage projects and seemed like the standard and then along comes Vite and makes it all obsolete. All these changes make it nearly impossible to write apps without immediate technical debt. Sorry to write a novel. Enjoying your course!!
@MakeAppswithDanny2 жыл бұрын
@@flogginga_dead_horse4022 Glad to hear you are starting to enjoy Composition API. I know, the changes are annoying, but that's just the bummer that comes with all tech, it's always changing. It took me 3 days to convert Fudget 2 over to Pinia (instead of Composable State Management). 👍