Sure, it definitely has a time and place though - mainly for things you need to be globally available, like the router and your Vuex/Pinia store. But I generally avoid using it, and tend to use props where I can.
Thanks for the tutorial. I'm wondering about common patterns of ajax errors and spinner issues. Is there any general pattern to avoid code duplication? Or do I need to copy-paste spinner and error handling code every time I need to add a new AJax query? Maybe you share an example. Thanks in advance.
I’ve bought all your courses and books. Is it posssible you can build a portfolio app? Where i can show my resume, links yo other projects, embed a todo app if possible etc… Like a all in one portfolio site. Thank you for the content. Either in the options or composition api. I learned how to convert from your me or the other.
Are you asking for a video tutorial on how to build a portfolio app? I think this would be definitely doable if you really internal all the content I've produced - I'd recommend you give it a try yourself, happy to take a look at some code if you get stuck.
I'm really not sure that provide/inject is a good technic that you should use, on our project (which we took from other developers) we tried to remove this pattern because of some troubles which it ships with. It is spaghetti code which I try to avoid for obvious reasons. I'm sure that it's helpful in some utility or magic things such as forms (maybe for validation purposes) but it really shouldn't be a thing that "you should use more often".
It's actually a pretty useful technique to decouple your components from some implementation details like storage, data provider etc, similar to Providers in Angular or (kind of) Context in React. I agree the name receive is actually much more clear, but they probably used "inject" for dependency injection, which is what it's doing
I did't get it. In documentation specified than we have to import ref from vue, but i did't see such record in your coed. 4:56 What's the trick?
the provide/inject is one of the edge cases feature that not recommended to using in common cases according to vue docs
Sure, it definitely has a time and place though - mainly for things you need to be globally available, like the router and your Vuex/Pinia store. But I generally avoid using it, and tend to use props where I can.
@@LachlanMiller imo when you're considering using provide/inject you can always use Pinia instead. Or composables.
These awesome videos are like gems for me
thanks, glad you find them useful :D
Thanks for the tutorial. I'm wondering about common patterns of ajax errors and spinner issues. Is there any general pattern to avoid code duplication? Or do I need to copy-paste spinner and error handling code every time I need to add a new AJax query? Maybe you share an example. Thanks in advance.
How would you do loading state in the router.js file
Going to need some more info, if you can share a code-base and explain what you want I could make a video showing how to do it
Hi Lachlan, would You share the code base of the things You show in this video?
Sure, here you go: github.com/lmiller1990/7-vue-patterns-source
@@LachlanMiller Thanks!
I’ve bought all your courses and books. Is it posssible you can build a portfolio app? Where i can show my resume, links yo other projects, embed a todo app if possible etc… Like a all in one portfolio site. Thank you for the content. Either in the options or composition api. I learned how to convert from your me or the other.
Are you asking for a video tutorial on how to build a portfolio app? I think this would be definitely doable if you really internal all the content I've produced - I'd recommend you give it a try yourself, happy to take a look at some code if you get stuck.
Thanks for yr videos
thanks for the comment - it means more than you think! it's super hard to get feedback, I appreciate it :D
I'm really not sure that provide/inject is a good technic that you should use, on our project (which we took from other developers) we tried to remove this pattern because of some troubles which it ships with. It is spaghetti code which I try to avoid for obvious reasons. I'm sure that it's helpful in some utility or magic things such as forms (maybe for validation purposes) but it really shouldn't be a thing that "you should use more often".
I agree, I do not use provide/inject outside of writing a third party plugin to throw on npm. I do not use provide/inject in regular apps.
It's actually a pretty useful technique to decouple your components from some implementation details like storage, data provider etc, similar to Providers in Angular or (kind of) Context in React.
I agree the name receive is actually much more clear, but they probably used "inject" for dependency injection, which is what it's doing
Hi, can I translate the this article into Chinese and share it to more developers? I will write the original author and the address of the article.
Yes, absolutely!
Please send me a link when you post it :)
RIP Ref Sugar
I was thinking that
Is that Comic Sans?
Thank you for taking away inject questionmark ! 🪡