Patterns for Error Handling
9:47
5 ай бұрын
Pushing Logic into Composables
11:32
Пікірлер
@Manoj-qf6lq
@Manoj-qf6lq 4 сағат бұрын
@ohsimtabem
@ohsimtabem 8 күн бұрын
Nice overview, as always! I'm doing a refactor of a legacy Rails app form to Vue and we have a mix of "Server config driven" + "Reward Early". We didn't want to discard the existing base field "rules schema" coming from the backend but, at the same time, we want to improve UX as the form is very complex/big/stepped. From my experience, the major problem with the "Server config driven" was dynamic/conditional field validation: a "field B" is required only if "field A" has a certain value. This led to duplication on the front end as we didn't find any good solution to share those rules and is indeed a source of bugs/inconsistencies. In some cases where the validation logic was so complex, we drop the client-side validation of that field and render the error only after validating on the server, so it is more of a hybrid approach! Thanks for another insightful video! Keep it up!
@LachlanMiller
@LachlanMiller 8 күн бұрын
I hadn't thought of the related field validation - eg only require field A when field B is checked, or something. Thanks for the comment, very insightful. Why are forms still so tedious in 2024 🤯
@Ari-lv8nc
@Ari-lv8nc 9 күн бұрын
why god , why
@kevinisaac4958
@kevinisaac4958 9 күн бұрын
You've got my subscribe. More videos like this please!
@mahadyounis8734
@mahadyounis8734 10 күн бұрын
Great
@adriatic123
@adriatic123 12 күн бұрын
Another useless feature. Vue project built 2 years ago is totally obsolete and doesnt work anymore. Talk about reliability, total failure. Next please
@LachlanMiller
@LachlanMiller 11 күн бұрын
Code doesn't just stop working - unless the environment changed, it should be fine. Docker solves this problem! What is the issue, I might be able to help you debug?
@serhiicho
@serhiicho 12 күн бұрын
Good explanation! Thanks
@dontry1812
@dontry1812 13 күн бұрын
Great stuff. I am starting to hook on Vite. One important thing I hope Vite had out of box is Module Federation, which is quite essential to build micro-frontend. Do you have any idea how to build micro-frontend with Vite?
@LachlanMiller
@LachlanMiller 13 күн бұрын
Not sure about micro frontends! I have not worked with those before. Let me know iff you find out!
@lamborghinicentenario2497
@lamborghinicentenario2497 14 күн бұрын
Why is this so hard to follow
@LachlanMiller
@LachlanMiller 13 күн бұрын
not sure, what part are you struggling with?
@jhlee111
@jhlee111 24 күн бұрын
I have been working on my vue3 project off on for last 2 years. Started with options API with SFC and later with composition. Watching your this video series helps me understand fundamentals of the framework. Your videos are very helpful especially in bridging gap between regular javascript/typescript world and fully tooled vue framework. You are one of the best teacher I found on youtube.
@LachlanMiller
@LachlanMiller 23 күн бұрын
Thank you! This is a really old series but I am glad you still found it useful. I re-recorded this entire course, check on Udemy!
@Pablitox26
@Pablitox26 Ай бұрын
This is amazing! Learned a lot, thanks so much!! 😃
@dimasheiko
@dimasheiko Ай бұрын
great video! please keep this tooling series going 👏
@LachlanMiller
@LachlanMiller Ай бұрын
Will do!
@Mari_Selalu_Berbuat_Kebaikan
@Mari_Selalu_Berbuat_Kebaikan Ай бұрын
Let's always do alot of good
@rameshramesh-bd2wu
@rameshramesh-bd2wu Ай бұрын
Awesome content, when can we expect your book ?
@LachlanMiller
@LachlanMiller Ай бұрын
Hopefully later this year, this kind of content takes a ton of time! I will send out email updates as they come.
@aidanwelch4763
@aidanwelch4763 Ай бұрын
There's so much worse it can be with SASS, handlebars, WASM, and so much extra complexity you can add on top lol
@Asvarox
@Asvarox Ай бұрын
I think there are couple of inaccuracies though as per Vite docs 1. when you run vite build it doesn't do typechecking and doesn't use tsc - it uses esbuild to get rid of types. You need to do the typechecking yourself or add a plugin 2. when building, by default esbuild is used to minify JS
@LachlanMiller
@LachlanMiller Ай бұрын
Definitely possible I made mistakes. I looked into your two points: 1. For type checking, I made a new react TS project. `npm run build` does this: > [email protected] build > tsc && vite build So you are right, vite build does not do type checking. But many Vite templates will run tsc when you run a build step. Good point, thank you for pointing this out. 2. Did not check this in depth but I suspect you are correct. Wasn't expecting this vid to blow up so much, will definitely be more thorough in future! I think this still gives a good overview of the general tools but there is a lot more going under the hood.
@bk1507
@bk1507 Ай бұрын
im confused in the hotmodule class you have an accept method that takes in a callback. but then the accept method is not called anywhere so where is the callback coming from?
@LachlanMiller
@LachlanMiller Ай бұрын
Confusing right... it is called in the `child,.js`, it is `import.meta.hot.accept(...)`. It is called as soon at the module is loaded. See here: github.com/lmiller1990/build-your-own-vite/blob/371c6a991615f881ac1562ebcbb2ffdf02fe9c6e/dev-server/src/child.js#L3
@bk1507
@bk1507 Ай бұрын
This sounds a lot like an interview I had at canva a few years ago
@LachlanMiller
@LachlanMiller Ай бұрын
I'll just share it, this was Atlassian, most likely a lot of people go back and forth between the two! I'm guessing this question has been used at a lot of places.
@aaditolkar
@aaditolkar Ай бұрын
Great series! It can be hard to understand how these tools work at a basic level but you made it very digestable!
@LachlanMiller
@LachlanMiller Ай бұрын
Thank you - I am glad you are enjoying it!
@Mac501pl
@Mac501pl Ай бұрын
Great video! Nice to know how things we take for granted actually work
@Kevin-xo5ul
@Kevin-xo5ul Ай бұрын
This is something I've been wanting to look into for a while, so great timing on the video.
@LachlanMiller
@LachlanMiller Ай бұрын
Hope you find it useful!
@sravansuresh7460
@sravansuresh7460 Ай бұрын
This was awesome. Loving the series.
@LachlanMiller
@LachlanMiller Ай бұрын
Thanks, glad you are enjoying it! Not sure what to focus on next, any recommendations?
@sravansuresh7460
@sravansuresh7460 Ай бұрын
@@LachlanMiller I have always been curious about source maps and how the browser uses them. I would also love to see a basic bundler & transpiler built with something like esbuild and what to keep in mind when working with them.
@LachlanMiller
@LachlanMiller Ай бұрын
@@sravansuresh7460 Source maps for sure, to show this off I think we need a bundler / transpiler first, that might be next 🔥
@TheAlexLichter
@TheAlexLichter Ай бұрын
I was today years old that it is Replacement and not Reload 🙈 Thanks for the video Lachlan 🙌🏻
@LachlanMiller
@LachlanMiller Ай бұрын
Thanks! Been tuning in to you & Michael's podcast, great stuff! SSR / hydration isn't something I know well, might have to hit you up for some help when I get to making a video about how that works under the hood...
@TheAlexLichter
@TheAlexLichter Ай бұрын
@@LachlanMiller Glad you enjoy the podcast ☺ Oh yes, absolutely! My DMs are always open 🙌🏻
@LachlanMiller
@LachlanMiller Ай бұрын
The R in HMR is for "replacement" - I say "reload" in this video (and have done so for years). Sorry about that 🤦‍♂ Enjoy!
@mohamadybr
@mohamadybr Ай бұрын
I like both frameworks. I used React a lot back in my uni and worked as a Vue(2) developer - soon I have to migrate to Vue 3. I like both! I enjoy the simplicity of Vue and the ability to move fast, but in all honesty, I prefer React! Although it is more difficult to manage, the amount of experience you gain is unmatched! I had to, forcefully, learn a lot of things in React to implement good Apps, but with Vue, it was just there! so far working with Vue2, I feel like I had to spend more time learning the framework than learning how to think about the problem I'm solving. To me, React gives more opportunities to be a better programmer as you have to learn more concepts and be more involved. On the other hand, Vue is just more relaxing to work with
@MilanDrazic
@MilanDrazic Ай бұрын
Vue code is so dummy. Tomorrow you looking code and don't know what code is doing. Anti-javascript
@LachlanMiller
@LachlanMiller Ай бұрын
Any examples of code you think is hard to understand in Vue?
@coffeemakir1977
@coffeemakir1977 Ай бұрын
Bro!!! This answered so many questions/problems nobody talks about since I looked at react years ago and now I have more questions 😭
@SXsoft99
@SXsoft99 Ай бұрын
One of the things that i find better in Vue over react is when you add conditions and other things like this The directives make the code easier to read when you have something more complex than a counter I have meet a lot of devs that comed from different backgrounds and they first used react and were apprehensive at the code but when using vue they felt all the pain points go away
@Usmankhaled
@Usmankhaled Ай бұрын
Absolutely brilliant. Seems like you witnessed everything as if you yourself was a kernel routing and directing every piece to work together just like that :)
@rredington305
@rredington305 Ай бұрын
Godspeed CRA, my loyal old friend. I'm hooked on Vite for months now.
@hut_fire1490
@hut_fire1490 Ай бұрын
Oh man, gold stuff sir ! I wish you can go deeper, but this stuff is a very great introduction already
@PRonYouTube
@PRonYouTube Ай бұрын
Loving this content on "JS infra", I think it's a very underserved area! You've earned a subscriber :)
@LachlanMiller
@LachlanMiller Ай бұрын
Thank you!
@brightyouthacademy
@brightyouthacademy Ай бұрын
Still amazed me
@armynyus9123
@armynyus9123 Ай бұрын
damn I would so much love to see this but I only have time after work hours and then I really physically can't look into bright white screens anymore. YT vids are where darkmode just fails.... uff had to scroll up even writing this. Maybe worth a consideration...
@LachlanMiller
@LachlanMiller Ай бұрын
Sorry about that 🙁
@malangope
@malangope Ай бұрын
I want to code in vue but felt i needed to go the react way because of its popularity and React native for mobile apps.
@LachlanMiller
@LachlanMiller Ай бұрын
This is fair, I use a lot of react too due to job market
@fogguy3838
@fogguy3838 Ай бұрын
exactly what I was looking for, Thanks, great job
@LachlanMiller
@LachlanMiller Ай бұрын
Glad it helped!
@truelancer-yf7jv
@truelancer-yf7jv Ай бұрын
Now finally i can understand some of quasar(component lib) source code. Before it was looking like greek 😅
@suleymanq
@suleymanq 2 ай бұрын
Thanks
@deepfuchsia7204
@deepfuchsia7204 2 ай бұрын
Do you believe we need this level of complexity on the front-end side?
@LachlanMiller
@LachlanMiller Ай бұрын
yes, doing frontend back in the day with no babel, no bundle, no types etc was a nightmare backend has this level of complexity too, it is just so well abstracted you don't get exposed to it
@aerostorm_
@aerostorm_ 2 ай бұрын
Amazing video. It took me transitioning a CRA project to Vite while modernizing some of my build processes to even understand half of what goes on when building a React app. I wish I had this video then.
@LachlanMiller
@LachlanMiller 2 ай бұрын
thankyou!
@anapartybharath33
@anapartybharath33 2 ай бұрын
this is probably the best video on internet, that explains the difference b/w react and Vue
@LachlanMiller
@LachlanMiller 2 ай бұрын
Wow thanks!
@makealemonade
@makealemonade 2 ай бұрын
My brain is thanking you.
@dasten123
@dasten123 2 ай бұрын
I really can't understand why ANYONE would choose React over Vue. This looks embarrassingly inefficient and stupid!
@LachlanMiller
@LachlanMiller 2 ай бұрын
I actually like both, I think there are good reasons to go with either!
@oinn6216
@oinn6216 2 ай бұрын
So Vue2 was inspired by Angular 1.x and Vue3 inspired by React niiiiice 😂
@LachlanMiller
@LachlanMiller 2 ай бұрын
I think it's great how all the frameworks are inspiring each other!
@metalcorewitchkhousovitch5774
@metalcorewitchkhousovitch5774 Ай бұрын
And Vue Vapor is inspired by Solid.js)
@mariobroselli3642
@mariobroselli3642 2 ай бұрын
How is this lang called, i want it lol
@LachlanMiller
@LachlanMiller 2 ай бұрын
I tried hacking on a preset for this recently - main downside is there isn't really a good way to make it work with TS. If you just get the right babel plugins, you can write this type of code!
@mariobroselli3642
@mariobroselli3642 2 ай бұрын
@@LachlanMiller i saw both Elm and Racket have web development
@aleks5652
@aleks5652 2 ай бұрын
I think you made a wrong comparison, because in vue you used ref, but in react - useState. That's quite different things.
@LachlanMiller
@LachlanMiller 2 ай бұрын
What would you recommend? I think this is the idiomatic way to handle state in both frameworks.
@boubaker86
@boubaker86 2 ай бұрын
Very informative video PS: I like your keyboard layouts
@LachlanMiller
@LachlanMiller 2 ай бұрын
hi! what do you mean keyboard layouts?
@XpressBits
@XpressBits 2 ай бұрын
Best tutorial watched in the recent days.. Precise and no BS... you got a great teaching skills, mate! Please keep doing the videos..
@LachlanMiller
@LachlanMiller 2 ай бұрын
thanks!!
@jamesgraham1462
@jamesgraham1462 2 ай бұрын
Well said. Thank you!
@LachlanMiller
@LachlanMiller 2 ай бұрын
Thank YOU
@harikotha7
@harikotha7 2 ай бұрын
Awesome!! Nice explanation. Keep making such explainer videos ❤