Lachlan Miller
Lachlan Miller
  • 174
  • 481 953
How Hot Module Replacement REALLY Works | JS Toolchain From Scratch
🎉 NEW book on tooling (build your own tools!) Coming 2024, register for updates): lachlan-miller.ck.page/92dfa021b3
⚠️ NOTE: I refer to HMR as Hot Module RELOAD - it's actually "Replacement", I had been saying in wrong for years.
🐦 My Twitter: Lachlan19900
✏️ Diagram/notes from video: app.eraser.io/workspace/W1ZOWqpCPrv4Vz2vcytS?origin=share
🔨 I am building an entire JS toolchain from (mostly) scratch. In this video, we lay the foundations and build out a naive but simple and functional hot module replacement (HMR) implementation.
Source: github.com/lmiller1990/build-your-own-vite/tree/main
มุมมอง: 3 913

วีดีโอ

Visual Guide to the Modern Frontend Toolchain (Vite)
มุมมอง 84K7 หลายเดือนก่อน
🎉 NEW book on tooling (build your own tools!) Coming 2024, register for updates): lachlan-miller.ck.page/92dfa021b3 🐦 My Twitter: Lachlan19900 ✏️ Diagram/notes from video: app.eraser.io/workspace/1CfLxNLf9DY9E9Ndesq4?origin=share I talk about Vite, the best toolchain for building frontend apps right now, which combines a number of other tools under the hood with with some extra good...
How To Debug Infuriating Module Errors
มุมมอง 9898 หลายเดือนก่อน
🎉 NEW book (coming 2024, register for updates): lachlan-miller.ck.page/92dfa021b3 📗 Current Book (Vue, Updated Aug 2023): lachlanmiller.gumroad.com/l/vuejs-design-patterns 🐦 My Twitter: Lachlan19900 🧠 Useful Links - Why you should ALWAYS use an extension: lachlan-miller.me/articles/why-you-should-always-use-an-extension-for-javascript-files - Node's creator regrets about module exte...
Vue's New Rendering Strategy (Vapor), Innovation vs Maintenance
มุมมอง 6K8 หลายเดือนก่อน
🎉 NEW book (coming 2024): lachlan-miller.ck.page/92dfa021b3 📗 Book (Vue, Updated Aug 2023): lachlanmiller.gumroad.com/l/vuejs-design-patterns 🐦 My Twitter: Lachlan19900 Today I talk about Vue's new rendering stategy, Vapor mode, performance, and more broadly the implications of innovation vs maintenance in the JS community. 🧠 References: - github.com/sveltejs/svelte/issues/2546 - va...
My Favorite TypeScript Tips and Tricks
มุมมอง 7K8 หลายเดือนก่อน
🎉 Writing a book about tooling, testing and development philosophy: lachlan-miller.ck.page/92dfa021b3 📗 Book (Vue, Updated Aug 2023): lachlanmiller.gumroad.com/l/vuejs-design-patterns Type Challenges to learn and push yourself github.com/type-challenges/type-challenges 🐦 My Twitter: Lachlan19900 Some neat TypeScript tips and tricks I've learned over the years. Now you know them, too!
3 Ways to Avoid Prop Drilling in Vue/React
มุมมอง 4.8K8 หลายเดือนก่อน
📗 Book (Updated Aug 2023): lachlanmiller.gumroad.com/l/vuejs-design-patterns 🎉 Writing a book about tooling, testing and development philosophy: lachlan-miller.ck.page/92dfa021b3 🐦 Twitter: Lachlan19900 Sick of passing props to deeply nested components? Here's a few alternatives I've used over the years, with my thoughts and recommendations.
Form Validation Strategies for JavaScript Apps
มุมมอง 1.3K8 หลายเดือนก่อน
📗 Book (Updated Aug 2023): lachlanmiller.gumroad.com/l/vuejs-design-patterns 🎉 Writing a book about tooling, testing and development philosophy: lachlan-miller.ck.page/92dfa021b3 🐦 Twitter: Lachlan19900 Some different approaches to validating forms I've seen over the years with my thoughts.
The Mighty Deferred Promise - An Interview Recount
มุมมอง 8K10 หลายเดือนก่อน
❗️ See the comments - I over-engineered this, my solution is far from ideal. Good discussion in comments! 👉 I am writing a book on tooling! Check it out: lachlan-miller.ck.page/92dfa021b3 🐦 Lachlan19900 I had an interview recently which featured an interesting question. In this video, I share the question and my solution, along with a construct, the mighty deferred promise. There's ...
Patterns for Error Handling
มุมมอง 2K10 หลายเดือนก่อน
👉 I am writing a book! Check it out: lachlan-miller.ck.page/92dfa021b3 📗Book on Design Patterns: lachlanmiller.gumroad.com/l/vuejs-design-patterns 🐦 Lachlan19900 In this video, I share some thoughts and techniques about error handling in a little application I'm working on.
The Difference Between Vue and React
มุมมอง 38Kปีที่แล้ว
📗 Book (Updated Aug 2023): lachlanmiller.gumroad.com/l/vuejs-design-patterns 🐦 Twitter: Lachlan19900 Today I talk about the philosophical difference between Vue and React and how it impacts the reactivity system of the two frameworks.
Renderless Component & Type Safety (Advent of Vue #17)
มุมมอง 1.2Kปีที่แล้ว
My solution to the 17th and final Advent of Vue challenge! Good one to end on - renderless components are a great example of separation of concerns. We also talk about pushing logic out of a component into a stateless function. I also talk about renderless components in my book: lachlan-miller.me/design-patterns-for-vuejs 👉 Link to algorithm www.movable-type.co.uk/scripts/latlong.html 👉 Haversi...
Type Safe Custom Directives (Advent of Vue #16)
มุมมอง 648ปีที่แล้ว
My solution to the 16th Advent of Vue challenge! Pretty quick one, and something that doesn't get as much attention as it probably deserves - custom directives. 🎄 Advent of Vue: adventofvue.com/ 💻 Code: github.com/lmiller1990/aov2022/tree/christmas-done 🐦 Keep up with me on Twitter! Lachlan19900 If you like my teaching style, I have a book and two courses! 👀 (Book) Design Patterns f...
Shuffling Arrays and a Map Trick (Advent of Vue #14)
มุมมอง 572ปีที่แล้ว
My solution to the 14th Advent of Vue challenge! New favorite - we get to talk about shuffling algorithms and the the jankiness of Array.prototype.sort. 👉 Fisher Yates Shuffle: en.wikipedia.org/wiki/Fisher–Yates_shuffle 🎄 Advent of Vue: adventofvue.com/ 💻 Code: github.com/lmiller1990/aov2022/tree/14-done 🐦 Keep up with me on Twitter! Lachlan19900 If you like my teaching style, I hav...
Solving a 2000 Year Old Problem with TDD and Vue (Advent of Vue #12)
มุมมอง 597ปีที่แล้ว
My solution to the 12th Advent of Vue challenge! This was my favorite one so far! Explaining this in a short video while coding was difficult, I hope it's not too difficult too confusing 🤯 👉 Numberphile on Josephus Problem th-cam.com/video/uCsD3ZGzMgE/w-d-xo.html 🎄 Advent of Vue: adventofvue.com/ 💻 Code: github.com/lmiller1990/aov2022/tree/aov-12-josephus 🐦 Keep up with me on Twitter! twitter.c...
Arbitrary Values & Properties in Tailwind (Advent of Vue #11)
มุมมอง 620ปีที่แล้ว
My solution to the 11th Advent of Vue challenge! Some neat Tailwind tips and tricks. 🎄 Advent of Vue: adventofvue.com/ 💻 Code: github.com/lmiller1990/aov2022/tree/aoc-11-twinkle-solution 🐦 Keep up with me on Twitter! Lachlan19900 If you like my teaching style, I have a book and two courses! 👀 (Book) Design Patterns for Vue.js: lachlan-miller.me/design-patterns-for-vuejs (YT_5_OFF fo...
TDD, TypeScript Tricks and Sorting (Advent of Vue #9)
มุมมอง 1.8Kปีที่แล้ว
TDD, TypeScript Tricks and Sorting (Advent of Vue #9)
Vue i18n & Locales (Advent of Vue #8)
มุมมอง 4.4Kปีที่แล้ว
Vue i18n & Locales (Advent of Vue #8)
Composables and Functional Logic (Advent of Vue #6)
มุมมอง 1.8Kปีที่แล้ว
Composables and Functional Logic (Advent of Vue #6)
For Loops? Recursion? (Advent of Vue #4)
มุมมอง 1.2Kปีที่แล้ว
For Loops? Recursion? (Advent of Vue #4)
Simple Functions and Conditionals (Advent of Vue #2)
มุมมอง 807ปีที่แล้ว
Simple Functions and Conditionals (Advent of Vue #2)
Fetching and Debounce in Vue (Advent of Vue #1)
มุมมอง 2.4Kปีที่แล้ว
Fetching and Debounce in Vue (Advent of Vue #1)
Pushing Logic into Composables
มุมมอง 1.8Kปีที่แล้ว
Pushing Logic into Composables
Cypress CT 5/8 - Asserting Again Emitted Events
มุมมอง 6032 ปีที่แล้ว
Cypress CT 5/8 - Asserting Again Emitted Events
Cypress CT 3/8 - Building a Better Mount
มุมมอง 7392 ปีที่แล้ว
Cypress CT 3/8 - Building a Better Mount
Cypress CT 1/8 - Diving in the Deep End with Cypress Component Testing
มุมมอง 4.9K2 ปีที่แล้ว
Cypress CT 1/8 - Diving in the Deep End with Cypress Component Testing
Cypress CT 8/8 - Better Type Safety, cy.mount & CT at Cypress
มุมมอง 4402 ปีที่แล้ว
Cypress CT 8/8 - Better Type Safety, cy.mount & CT at Cypress
Cypress CT 2/8 - A Useful Pattern for Wrapping Components
มุมมอง 1.4K2 ปีที่แล้ว
Cypress CT 2/8 - A Useful Pattern for Wrapping Components
Cypress CT 6/8 - Forms & Intercepting Requests
มุมมอง 4432 ปีที่แล้ว
Cypress CT 6/8 - Forms & Intercepting Requests
Cypress CT 7/8 - A Suspenseful Test
มุมมอง 2972 ปีที่แล้ว
Cypress CT 7/8 - A Suspenseful Test
Cypress CT 4/8 - The Seam Between CT & E2E Tests
มุมมอง 4762 ปีที่แล้ว
Cypress CT 4/8 - The Seam Between CT & E2E Tests

ความคิดเห็น

  • @suhasnama2795
    @suhasnama2795 16 ชั่วโมงที่ผ่านมา

    Excellent explanation!

  • @carnivorous_vegan
    @carnivorous_vegan วันที่ผ่านมา

    Which version of vue test utils did you use? Since this is 4 years old, I'm trying to check if there's been significant changes where following along with this won't be helpful. Thank you

    • @LachlanMiller
      @LachlanMiller วันที่ผ่านมา

      No major changes to Test Utils - I'm the author of it and we have never and any major breaking changes. what issue are youhaving?

  • @letscode4277
    @letscode4277 3 วันที่ผ่านมา

    where's the book man? I've been waiting for some time! Good luck with it.

    • @LachlanMiller
      @LachlanMiller 3 วันที่ผ่านมา

      I will work on it again soon. I ended up going back to college for a masters which consumed my whole life but that will finish mid Nov!!

  • @gkiokan
    @gkiokan 7 วันที่ผ่านมา

    I did bundle with grunt at the very beginning where nothing else existed, then webpack and I stay at webpack until it breaks something specially. Never change a good running system. So Vite does sound good, but I would never refactor my bundle process on a existing process. So I will wait wait wait and wait until it's mature enough. For new Projects, it's worth maybe the try. Just my 2 cents.

  • @marcialabrahantes3369
    @marcialabrahantes3369 11 วันที่ผ่านมา

    webpack was built FOR react. aside from that, great content we've been building on complicated frontends for a while before webpack

  • @coder_one
    @coder_one 12 วันที่ผ่านมา

    Non-mutable state is one of the advantages of React. Fortunately, you can write a simple composable "useState" that will provide a reactive value and a function to change it in Vue. Why is that? Because good patterns are worth using regardless of the frameworks you work in

    • @LachlanMiller
      @LachlanMiller 12 วันที่ผ่านมา

      Why is mutable state bad? I think it's fine - as long as you manage it well, try to keep the mutation limited, and understand your system and how the data flows through it: bar.value = "foo" setBar("foo") Are these really that different? Seeing a function call without assignment (in the `setBar` example) means there **is** a side effect (mutation) somewhere, right?

    • @coder_one
      @coder_one 12 วันที่ผ่านมา

      @@LachlanMiller There have been a whole bunch of books, articles, videos and projects proving why direct state mutation is the cause of many bugs, including ones that are difficult to debug. Comments under the youtube video does not lend itself to a thorough discussion of this issue, I recommend You a little work with a search bar and you will easily find a comprehensive materials about the the drawbacks of directly mutable state.

    • @LachlanMiller
      @LachlanMiller 11 วันที่ผ่านมา

      @@coder_one Yep definitely a ton of content out there. I am not convinced `setState(foo)` is any better than `foo.value = "bar'"` - it's more about how and where you handle the mutation than anything else, imo. Ideally - push the mutation to the edges of your system, and understand how the data flows; keep your business logic immutable and pure, and only mutate things in response to external effects (API call, user interaction...). Fascinating topic! My favorite video on this is "Functional Core, Imperative Shell" from "Destroy all Software". Check it out and lmk what you think!

  • @Puji-cr7ps
    @Puji-cr7ps 13 วันที่ผ่านมา

    what is opt in actually?

  • @sinaniksaba6741
    @sinaniksaba6741 13 วันที่ผ่านมา

    0:51 is the best part of the video

  • @YoussefAdelWahba
    @YoussefAdelWahba 21 วันที่ผ่านมา

    I always love to know what is happening under the hood in the tools and frameworks I use otherwise I feel uncomfortable while using them and this explanation helped me to scratch the surface and figure out what is going on and what are these tools is all about, thank you a lot.

  • @YoussefAdelWahba
    @YoussefAdelWahba 21 วันที่ผ่านมา

    thank you, this is extremely helpful and clear.

  • @senayb3
    @senayb3 25 วันที่ผ่านมา

    Great run through!! Helps wrap my head around things.

  • @SSn0wx
    @SSn0wx หลายเดือนก่อน

    Pretty cool video :)

  • @daremondlars
    @daremondlars หลายเดือนก่อน

    React is used when you decide to follow the status quo, Vue is used when you decide to be happy

  • @Bug-Free
    @Bug-Free หลายเดือนก่อน

    React is opt-out, Vue is opt-in. I said this to ChatGPT, then said choose one of the two: opt-out or opt-in. Then, its answer: Opt-In is generally considered good because it provides a more guided and structured approach, making it easier for developers to adopt best practices and tools gradually. This can simplify the development process and ensure consistency across the project.

  • @AnthonyChablov
    @AnthonyChablov หลายเดือนก่อน

    Another framework from FB we are not gonna talk about XD

  • @MrJloa
    @MrJloa หลายเดือนก่อน

    25:40 the hardest part of this is implementing the actual real life hot.accept method. I know that u used a simplified example where u just rerender the component, but it real-life conditions it would be much harder (like how do restore the props state for the hot swapped component from the parent?)

    • @LachlanMiller
      @LachlanMiller หลายเดือนก่อน

      Yep, and if a component imports a module and the module changes, you need to notify the component, and (maybe) anything importing said component... For framework specific things (like props) some frameworks have some utils. Eg React has fast refresh, integrated here github.com/vitejs/vite-plugin-react/blob/0f7684ae277da8b92da4d98c8eabafe5fc7b18ae/packages/plugin-react/src/fast-refresh.ts#L67 Although this is simplified gotta start somewhere! The next step here would be considering modules (need a module tree) and then framework specific hooks.

  • @冯珂-k8s
    @冯珂-k8s หลายเดือนก่อน

    cool and make sense

  • @danyboomz
    @danyboomz หลายเดือนก่อน

    What do you think about writing it this way ? ``` test.each([ { count: 1, expected: 'odd', }, { count: 2, expected: 'even', }, ])('should test if $count if $expected', async ({ count, expected }) => { const wrapper = mount(app, { props: { count, }, }); expect(wrapper.html()).toContain('Hello, world!'); expect(wrapper.html()).toContain(`Count: ${count} is ${expected}`); }); ```

    • @LachlanMiller
      @LachlanMiller หลายเดือนก่อน

      Very readable, I find these hard to debug if some of the break though, you can't just slap on a `it.only`

    • @danyboomz
      @danyboomz หลายเดือนก่อน

      @@LachlanMiller You could .slice(0, 1) the dataset array but I agree that it's not really convenient !

  • @thedailycutline278
    @thedailycutline278 หลายเดือนก่อน

    The best thing is react devs dont talk about other frameworks being bad, we just build stuff, bcos competitors whos combined framework marketshare dont even come close to half of react usage, keep on yupping about how their framework is better rather than building good projects, what am guessing is vue and svelte cant build great projects and startups, they are the cool kids of frameworks, their users only yup 24/7 how they r better.

    • @LachlanMiller
      @LachlanMiller หลายเดือนก่อน

      I have no idea how you got that impression from this video, I think I gave a pretty good overview of the reactivity systems. In my exp most of the developers I know are pretty happy to work with either React, Vue or whatever other tool is required.

    • @grzegorzkiselev
      @grzegorzkiselev หลายเดือนก่อน

      Up until this comment I thought react devs never yapping

  • @letscode4277
    @letscode4277 หลายเดือนก่อน

    any updates with the book? I've been waiting for it since i subscribed

    • @LachlanMiller
      @LachlanMiller หลายเดือนก่อน

      I'm sorry I haven't been active in this regard. I ended up going back to study part-time and content creation, my hobby, has taken a bit of a back seat. I might just aim for some more videos in the interim... any particular topic that fascinates you, that'd you like to know more about?

  • @JesseBethke
    @JesseBethke 2 หลายเดือนก่อน

    For the Index Types; what I do is define TestingTypes as an enum and TestingType as a `typeof keyof TestingTypes`

  • @dimitriborgers9800
    @dimitriborgers9800 2 หลายเดือนก่อน

    Super helpful, thank you!

  • @NoName-tt9ye
    @NoName-tt9ye 2 หลายเดือนก่อน

    Great video, I really like the flow of it

  • @MuhammadIbrahim-x3h
    @MuhammadIbrahim-x3h 2 หลายเดือนก่อน

    You have awesome content.I am stuck on a problem plz guide me on I am implementing server-side rendering for a datatable (e.g., blog listing) in my Laravel project. I need to create a JavaScript file for this purpose. Should I place this datatable JS file in the public directory? If so, how do I compile the JS file from the resources directory to the public directory using Laravel Vite?Where should be the file placement in the folder structure. project-root/ ├── resources/ │ ├── js/ │ │ ├── app.js │ │ └── datatable/ │ │ └── blogListing.js ├── public/ │ └── build/ ├── vite.config.js ├── package.json └── ...

  • @wattsfield1889
    @wattsfield1889 2 หลายเดือนก่อน

    Great vid! Love how you went on the whole journey from just html to more.

  • @aimanali7877
    @aimanali7877 2 หลายเดือนก่อน

    Content 🗿

  • @dimis7096
    @dimis7096 2 หลายเดือนก่อน

    oh my god friend you will never believe how useful this video was for me and how many concepts you helped me to grasp ! Thank you very much , i love you i wish you the best <3

  • @gdifrancesco
    @gdifrancesco 2 หลายเดือนก่อน

    First of all, great video! I was struggling to find some good comparison as you did, nice job! At 9:26, actually the whole React JSX gets rerendered. That's how React works: whenever a state (useState) changes, the whole function will be executed, including the render/JSX. There are no exceptions on this. There are no actual "dependencies" for the JSX render, it's just about the state changes. It's behind the scenes that React decides whether a node should be "committed" to the DOM, i.e. change the actual DOM nodes: this phase is called "Commit", and it's the last one of the whole rendering process. But this is something we shouldn't care much about as devs, we just have to know that the whole function/component gets re-executed and re-rendered. When you "opt-out" a variable from the reactivity as you said, it just ensures it remains the same (not reassigned, meaning the function inside useMemo is not called) unless an element in the dep array changes (strict equal ===). This is just about expensive computations of that specific variable, therefore it's quite rare to use. Anyway, I loved how deep you dived into these things, which could open up a lot of thoughts into various aspects of both tools. Thanks for the video!

    • @LachlanMiller
      @LachlanMiller 2 หลายเดือนก่อน

      thanks for the kind words! sounds like you have a great understanding of this now. worth considering that apparently React has a compiler that changes how rendering works - I'd recommend checking that out to see what's the latest developments in that area.

  • @cariyaputta
    @cariyaputta 2 หลายเดือนก่อน

    Thanks. Quality explanation.

  • @marknielsen4494
    @marknielsen4494 2 หลายเดือนก่อน

    Excellent

  • @malcolmvernon6808
    @malcolmvernon6808 2 หลายเดือนก่อน

    typescript already gives you warnings if you try to edit a const array or object litteral

    • @LachlanMiller
      @LachlanMiller 2 หลายเดือนก่อน

      Did not realize this - which tip are you referring to w/ this comment specifically?

    • @malcolmvernon6808
      @malcolmvernon6808 2 หลายเดือนก่อน

      @@LachlanMiller In close to the beginning of the video you said to mark const variables "as const" in typescript (first tip actually). And I thought "wow what a cool trick" and then I did an experiment with it and then I was like - WAIT A MIN - typescript already does this out the box without needing to add as const to it. I'm not sure if maybe older typscript versions didn't do that. I tried it mutating both const array and const object litterals and it all gives red warning underlines for it out the box with my tsx files if you try to mutate them

    • @LachlanMiller
      @LachlanMiller 2 หลายเดือนก่อน

      @@malcolmvernon6808 I think older versions of TS did not do this, glad it's getting stricter

  • @TourBD-53
    @TourBD-53 2 หลายเดือนก่อน

    Hello, I was analyzing your TH-cam channel. your you tube SEO score is zero. It should be increased. and subscribers ,views , like, comments is very low according to your channel age. This is why your you tube growth is very low and your channel setup is also having many problems. If, you can solve this problems your channel will grow and be famous very quickly.

  • @micahtonning7967
    @micahtonning7967 2 หลายเดือนก่อน

    Thank you for creating this video. It was extremely helpful.

  • @menglin7432
    @menglin7432 2 หลายเดือนก่อน

    Now this is something I'd highly recommend any JS developer to watch

  • @June-c2q
    @June-c2q 2 หลายเดือนก่อน

    Great content. Thanks

  • @AkshyatChapagain
    @AkshyatChapagain 2 หลายเดือนก่อน

    Just amazing, every new person getting into web dev should watch this video. I can't believe you don't have more subscribers.

  • @sangramdesai4295
    @sangramdesai4295 2 หลายเดือนก่อน

    Nice explanation! I loved how you compared Vue.js and React. Please post a new video explaining how code is compiled in both frameworks step by step

  • @dimitriborgers9800
    @dimitriborgers9800 3 หลายเดือนก่อน

    One question: if webpack bundles everything (including third party modules) into bundle.js, doesn't that ever get too big for the browser? The Gatsby library has 1200+ modules; I would assume the bundle.js would be absolutely massive.

    • @LachlanMiller
      @LachlanMiller 3 หลายเดือนก่อน

      You can load modules async, so the initial bundle isn't huge. But yes, some libs have really huge bundles - I do not think there is any upper limit, I have worked on apps with 20mb of JS. This takes a long time to parse in the browser. Things like gzip, minify, etc can make it a lot smaller.

  • @alimaher1
    @alimaher1 3 หลายเดือนก่อน

    Came here after the beef between Evan You and the guy from TsCoding Haha. Really interesting stuff really. Great video! Thanks, man.

    • @LachlanMiller
      @LachlanMiller 3 หลายเดือนก่อน

      what beef?

    • @alimaher1
      @alimaher1 3 หลายเดือนก่อน

      @@LachlanMiller th-cam.com/video/96JvriLR4s8/w-d-xo.htmlsi=q9UEoAah88cwMcAl I mean this

    • @cotyhamilton
      @cotyhamilton 7 วันที่ผ่านมา

      Same 😂

  • @dimitriborgers9800
    @dimitriborgers9800 3 หลายเดือนก่อน

    This is a phenomenal video, thank you!

  • @KousayJebir
    @KousayJebir 3 หลายเดือนก่อน

    awesome video man ! i do have a quick question tho , when you reached the part of using react and imported React from 'react' what tool was responsible to resolve the location of 'react' or to be more precise the actual location of the file that contains the React object

    • @LachlanMiller
      @LachlanMiller 3 หลายเดือนก่อน

      Whatever runtime you are using will resolve modules using its own pre-determined rules. In this video the runtime is Node.js. You can google "node.js module resolution algorithm" or read here. nodejs.org/api/modules.html#loading-from-node_modules-folders In Node.js if the import is not a relative path, it will look in `node_modules` and then find the `package.json` for the module. In there it looks at specific fields like "main", etc.

    • @KousayJebir
      @KousayJebir 2 หลายเดือนก่อน

      @@LachlanMiller thank you very much

  • @metallust
    @metallust 3 หลายเดือนก่อน

    Actual web development

  • @DmitriiBaranov-ib3kf
    @DmitriiBaranov-ib3kf 3 หลายเดือนก่อน

    At least four new allocations on every count update in this React component. And zero in Vue

    • @LachlanMiller
      @LachlanMiller 3 หลายเดือนก่อน

      No doubt there is room for optimisation, just an example to illustrate the difference in reactivity systems!

    • @DmitriiBaranov-ib3kf
      @DmitriiBaranov-ib3kf 3 หลายเดือนก่อน

      @@LachlanMiller I agree, but there seems to be no room for optimization for Vue reactivity system. Besides, React won't go to this optimization room, so to say, since it'd be a whole paradigm shift. React is based on a flawed immutability-first approach, which causes tons of allocations and loops (both in spreads and dependency array comparisons)

  • @Ayvengo21
    @Ayvengo21 3 หลายเดือนก่อน

    It's a bit unclear and i haven't see some good explanation how does vue know that there was a change in some of the ref variables. Like is it some setInterval that check it or some hidden setter function?

    • @LachlanMiller
      @LachlanMiller 3 หลายเดือนก่อน

      It creates a map of all dependencies for each reactive effect. See th-cam.com/video/HzhcXVFEiVY/w-d-xo.html or lachlan-miller.me/articles/vue-3-reactivity-from-scratch

  • @vitaliyd23
    @vitaliyd23 3 หลายเดือนก่อน

    What a gem! Love that you included the error solving parts and the "single take" nature of the video. Liked, subscribed, and added to a playlist)

  • @handmadegamesdev
    @handmadegamesdev 3 หลายเดือนก่อน

    Great video. This is exactly the type of breakdown I was looking for.

  • @oussamareghay7081
    @oussamareghay7081 3 หลายเดือนก่อน

    Thanks a lot fo the tutorial !

  • @atlantic_love
    @atlantic_love 3 หลายเดือนก่อน

    For the Vue side, it appears to me that you have a function called watchEffect, but when the button is clicked it is calling a function named onClick. I don't understand this.

    • @doylanmihov3939
      @doylanmihov3939 หลายเดือนก่อน

      The watchEffect is a VueJs hook/event itself provided by the api, whilst the onClick function is made by the developer and is a arbitrary name he could have called it anything. Since in VueJs 3 there is no longer the seperatation between methods and vue hooks/events so it can be found in the same space.

  • @chiemekae718
    @chiemekae718 3 หลายเดือนก่อน

    you got a subscriber here

  • @chiemekae718
    @chiemekae718 3 หลายเดือนก่อน

    excellent resources alway hard to show up on searches on TH-cam. You are Amazing mate