Тёмный
No video :(

7 Vue Patterns That You Should Be Using More Often 

Lachlan Miller
Подписаться 10 тыс.
Просмотров 33 тыс.
50% 1

Original article: / 7-vue-patterns-that-yo...
Source code: github.com/lmi...
Ref sugar RFC: github.com/vue...
Script setup RFC: github.com/vue...
Follow Fotis: / fadamakis
Me on Twitter: / lachlan19900
📗 $5 off my Design Patterns for Vue.js with YT_5_OFF: lachlan-miller...

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@residentk.8881
@residentk.8881 2 года назад
the provide/inject is one of the edge cases feature that not recommended to using in common cases according to vue docs
@LachlanMiller
@LachlanMiller 2 года назад
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.
@theseangle
@theseangle Год назад
@@LachlanMiller imo when you're considering using provide/inject you can always use Pinia instead. Or composables.
@brahim_boussadjra
@brahim_boussadjra 3 года назад
These awesome videos are like gems for me
@LachlanMiller
@LachlanMiller 3 года назад
thanks, glad you find them useful :D
@aroxing
@aroxing 2 года назад
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.
@adevin9155
@adevin9155 3 года назад
Thanks for yr videos
@LachlanMiller
@LachlanMiller 3 года назад
thanks for the comment - it means more than you think! it's super hard to get feedback, I appreciate it :D
@vasiliyrusin
@vasiliyrusin Год назад
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".
@LachlanMiller
@LachlanMiller Год назад
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.
@timmeehan2365
@timmeehan2365 7 месяцев назад
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
@jaymartinez311
@jaymartinez311 2 года назад
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.
@LachlanMiller
@LachlanMiller 2 года назад
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.
@zergzerg4844
@zergzerg4844 Год назад
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?
@rickyu1978
@rickyu1978 3 года назад
How would you do loading state in the router.js file
@LachlanMiller
@LachlanMiller 3 года назад
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
@user-bw3vr6qb7g
@user-bw3vr6qb7g 3 года назад
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.
@LachlanMiller
@LachlanMiller 3 года назад
Yes, absolutely! Please send me a link when you post it :)
@wobsoriano
@wobsoriano Год назад
RIP Ref Sugar
@equinozio22
@equinozio22 Год назад
I was thinking that
@christiann7058
@christiann7058 3 года назад
Hi Lachlan, would You share the code base of the things You show in this video?
@LachlanMiller
@LachlanMiller 3 года назад
Sure, here you go: github.com/lmiller1990/7-vue-patterns-source
@christiann7058
@christiann7058 3 года назад
@@LachlanMiller Thanks!
@em9999999
@em9999999 Год назад
Is that Comic Sans?
@wernerlang3115
@wernerlang3115 Год назад
Thank you for taking away inject questionmark ! 🪡
Далее
Vuex 5 Preview
12:41
Просмотров 5 тыс.
Oh No! My Doll Fell In The Dirt🤧💩
00:17
Просмотров 10 млн
A Better Way To Organize Components In Vue
10:10
Просмотров 20 тыс.
The Difference Between Vue and React
10:27
Просмотров 35 тыс.
Visual Guide to the Modern Frontend Toolchain (Vite)
9:18
Vapor: The Future Of Vue
21:27
Просмотров 118 тыс.
My Favorite TypeScript Tips and Tricks
10:21
Просмотров 6 тыс.
3 Ways to Avoid Prop Drilling in Vue/React
9:34
Просмотров 4,5 тыс.
I Cannot Believe TypeScript Recommends You Do This!
7:45