With all due respect, I'm 7 minutes in and there is no explanation of what the composition API is, nor the benefits of using it. I don't see how this is a tutorial.
Also, when returning repos data from github api, he says "gh has rate limiting" because it's returning 30 entries at a time. It will have rate limiting, but that was pagination. SMH.
Small, but an important mistake at the very beginning: "Some backend languages like NODE". Node is not a backend language. You are sort of influencer, so please be precise, so more junior people won't get it wrong.
@@demonicious_ this is completely wrong statement. "Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine." It's runtime for JS, not the different language.
How is the Composition API better than the tools we already have to achieve the same thing in Vue 2? I've been hearing and reading a lot of buzz about the Composition API, but I honestly don't see the benefit compared to using watch, data, methods, etc. Just seems like a fancy way to do the same thing. Maybe I'm missing something?
My understanding is that it is meant to be beneficial when creating large applications. I don't there is a benefit for small demo apps. One cool thing about Vue 3 is the ability to make data non-reactive. Previously with Vue any data properties were reactive, which has an overhead if that data doesn't need to be.
Thanks for the vid! Fun fact: Erik written your way is a hugely common name in Scandinavia, so that's probably why you can't get the username anywhere. :)
could you use selectors for styling the components and elements? i suggest just because the id's and class's are distracting from the code your writing, and would likely help viewers learn from you content more efficiently
@@ProgramWithErik, yeah and now I have to buy one in Iran with all these sanctions (from us) and hard times in economic problems! :-D jokes aside thank you for your content.
Hey, Erik! Thanks for the vue3 and ts content! Quick question, why would I use this syntax over over just firing a method and populating the lis? Thanks!
I wanted to illustrate how the watch function can be triggered when any reactive variable changes. For example we could use the same watch function if the username was coming from a prop. Or maybe another function changed the user name, the watch would still be triggered.
I would like to have more precision during the explanation between reactive & ref. Also I didn't understand well the use of toRefs() Thanks for the content, it's just a feedback for you, I know I can open the documentation but when watching the video it's cool to have the most importants informations
why do you have a watch function? Can you not just use the original name variable? Can't you just make a regular method that gets called on click and fetches the api? That way you don't declare another variable you just use the original since that is what you want. You just choose when to look at the variable and then after you get the data clear the original variable. Idk I'm just confused at why you declare another variable I guess to just demonstrate the watch function. Also I do not know the benefits of using reactive vs ref. Reactive just lets you declare an object and reference its' keys on assignment? Can you not do that with a ref? Idk another video elaborating the difference might be good.
Thanks for the feedback Alisha! Yes, I created the other variable so I could use the watch function. This was to illustrate that when any reactive variable inside the watch function changes the whole watch function gets triggered again. You are right I could have put the fetch in it's own regular method, but that would miss the point. Let's say for example the username came not from an input, but from a prop being passed down. In that case you'd have to have some sort of dynamic way of having the fetch re-trigger. That's the power of watch. Also ref and reactive are very similar. The way I like to think about it is, I use reactive for objects and ref for simpler items like booleans, or integers, but I need them to be reactive. You could use Reactive for everything if you wanted too...
@@ProgramWithErik how is that a good thing? Those effects will be running any time anything changes. And that code could be making api callls!! Isn't there a way like in v2 to have watchers be for specified property?
@@RussPainter8 i think variables that use ref() and reactive() will be watched only. A better solution would be to add a function to the click event to search for users.
sorry but I still don't see the benefit of migrating to vue3 yet. already released two non trivial apps using vue2, works just fine. gonna dive deeper though still...
@@ProgramWithErik Actually... just about every question one can have regarding the composition API, except maybe the syntax (partially). I was really hoping to see some explanation of _why_ this new API exists. Instead, you showed a code example that would look much better with the options API. That kind of makes the problem many people are having with this API worse.