7 Vue Patterns That You Should Be Using More Often

  Рет қаралды 35,040

Lachlan Miller

Lachlan Miller

Күн бұрын

Пікірлер: 27
@brahim_boussadjra
@brahim_boussadjra 4 жыл бұрын
These awesome videos are like gems for me
@LachlanMiller
@LachlanMiller 4 жыл бұрын
thanks, glad you find them useful :D
@residentk.8881
@residentk.8881 3 жыл бұрын
the provide/inject is one of the edge cases feature that not recommended to using in common cases according to vue docs
@LachlanMiller
@LachlanMiller 3 жыл бұрын
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 2 жыл бұрын
@@LachlanMiller imo when you're considering using provide/inject you can always use Pinia instead. Or composables.
@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?
@adevin9155
@adevin9155 4 жыл бұрын
Thanks for yr videos
@LachlanMiller
@LachlanMiller 4 жыл бұрын
thanks for the comment - it means more than you think! it's super hard to get feedback, I appreciate it :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.
@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.
@vasiliyrusin
@vasiliyrusin 2 жыл бұрын
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 Жыл бұрын
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
@rickyu1978
@rickyu1978 4 жыл бұрын
How would you do loading state in the router.js file
@LachlanMiller
@LachlanMiller 4 жыл бұрын
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
@christiann7058
@christiann7058 4 жыл бұрын
Hi Lachlan, would You share the code base of the things You show in this video?
@LachlanMiller
@LachlanMiller 4 жыл бұрын
Sure, here you go: github.com/lmiller1990/7-vue-patterns-source
@christiann7058
@christiann7058 4 жыл бұрын
@@LachlanMiller Thanks!
@前端小智
@前端小智 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
@em9999999
@em9999999 2 жыл бұрын
Is that Comic Sans?
@wernerlang3115
@wernerlang3115 Жыл бұрын
Thank you for taking away inject questionmark ! 🪡
Vuex 5 Preview
12:41
Lachlan Miller
Рет қаралды 5 М.
New component patterns for Vue 3
21:12
Vue Mastery
Рет қаралды 38 М.
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
-5+3은 뭔가요? 📚 #shorts
0:19
5 분 Tricks
Рет қаралды 13 МЛН
3 Ways to Avoid Prop Drilling in Vue/React
9:34
Lachlan Miller
Рет қаралды 5 М.
The Difference Between Vue and React
10:27
Lachlan Miller
Рет қаралды 44 М.
Vue's New Rendering Strategy (Vapor), Innovation vs Maintenance
7:22
Patterns for Large Scale Vue.js Applications - VueConf US 2023
18:54
Vue.js Advanced Data Provider Component Patterns Explained
14:07
Program With Erik
Рет қаралды 23 М.
Vapor: The Future Of Vue
21:27
Theo - t3․gg
Рет қаралды 128 М.
Stop Using .value with ref In Vue 3! Reactivity Transformed Explained!
14:22
Every New Vue Developer Has Made These Mistakes...
18:04
Program With Erik
Рет қаралды 45 М.
Mastering SOLID Principles in Vue 3: Unleash Clean & Scalable Code!
16:18
WebDevWithArtisan
Рет қаралды 2,6 М.