Это видео недоступно.
Сожалеем об этом.

Make Web Components great with Lit

Поделиться
HTML-код
  • Опубликовано: 6 окт 2022
  • A quick look at Lit.
    💬 Topics:
    - The web components standard;
    - Integration with the JS standards;
    - Benefits of Lit;
    - Create web components with Lit.
    🔥 The "First Impressions" series:
    - Deno - • Deno and the future of...
    - Astro - • Astro JS is here to stay
    - Supabase - • Backend as a Service W...
    #javascript #litjs

Комментарии • 30

  • @ChrisAthanas
    @ChrisAthanas Год назад +6

    It would b useful to show the finished component first so we know what you are working towards

    • @awesome-coding
      @awesome-coding  Год назад +3

      Yes, you are right - thanks for the suggestion!

  • @khaldounal-nuaimi3594
    @khaldounal-nuaimi3594 Год назад +8

    I love the potential of web components and hope to see them more widely used in the future. However, the amount of code it takes to write a simple web component vs a Vue component is just so much. I am sticking with Vue for now. Thanks for the informative video!

    • @awesome-coding
      @awesome-coding  Год назад

      @Khaldoun Al-nuaimi - you are right. It's tough to be atractive when your competitors offer everything under the sun 😅

    • @imagineabout4153
      @imagineabout4153 Год назад

      Have you guys tried alpinejs?

    • @awesome-coding
      @awesome-coding  Год назад

      @Imagine about - I actually have a video on Alpine - Alpine JS is pretty useful
      ruclips.net/video/CPXUsbgv_V0/видео.html

    • @pointgbreak
      @pointgbreak Год назад

      Why not both? We build web components using vue 3 at work, we ship them as web widgets to let our clients use them in their site that may not be built using Vue.

    • @awesome-coding
      @awesome-coding  Год назад

      @Horace Keung This is probably the most reasonable approach since you can leverage the power of a large framework and the portability of web components.

  • @luciopoveda7716
    @luciopoveda7716 Год назад

    I loved how simple you kept it!

  • @MikeNugget
    @MikeNugget Год назад +1

    Awesome video!
    It would be nice to see Lit + SASS + Tailwind boilerplate tutorial ;)

  • @aaronmendez9284
    @aaronmendez9284 Год назад

    Love the video bro, your channel has great potential. My only recommendation is try making the images a bit bigger, so it's a bit easier to see.
    Great video! Liked and subscribed!

    • @awesome-coding
      @awesome-coding  Год назад +1

      Thanks for the kind words and for the feedback! It really helps!

  • @LO000L
    @LO000L Год назад

    Does lit have something like before destroy? Or before unmount? lifecycle method? I only see disconnectedCallback.

    • @awesome-coding
      @awesome-coding  Год назад +1

      @Slippin Jimmy - Lit is mapping the lifecycle hooks provided by the WebComponents specification so you only have access to connected / disconnected callbacks. In my experience they are enough for most use cases. Are you facing a scenario where the disconnectedCallback is not enough?

    • @LO000L
      @LO000L Год назад

      @@awesome-coding Thanks for replying! Yes I have a use case where user need to click a button first before he can be able to navigate to other page. In react/vue I can do it easily with the beforeDestroy lifecycle and the native beforeunload event. In lit though I am not really sure.

  • @harshrathod50
    @harshrathod50 Год назад

    I keep using MUI and then break their web components to suit my needs. 😂 Not a good practice but is there another way to override their behaviour, layout?

    • @ashleyfreebush
      @ashleyfreebush Год назад +1

      Facing the same issue!!!

    • @harshrathod50
      @harshrathod50 Год назад

      @@ashleyfreebush And now I am considering switching back to pure Tailwind and copy MUI's components from their source code and then modify them to meet my needs.
      But one thing that I am worried about is the "theme" part. MUI's theme implementation rocks 🔥. 😎

    • @JonathanRose24
      @JonathanRose24 Год назад +1

      Why not just use components without styles then? Something like headlessUI sounds like it would work for you. I think most people should avoid using MUI, unless you just want a quick and generic UI. Trying to beat MUI into submission is a bad idea

    • @awesome-coding
      @awesome-coding  Год назад +1

      @Jonathan Rose that might be the way to go in this situation.
      @Slippin Jimmy - we are facing a similar problem in a project where we are using Ant Design. We are lucky that the requested changes are not that impactful and that ant design is quite flexible.
      I also saw situations where Prime NG components are fully rewritten in house because behaviour had to be different.
      People are doing everything under the sun in real projects. I was taking this seriously e few years back, but now my mind set is pretty much "if it works it ain't stupid" 😅

    • @harshrathod50
      @harshrathod50 Год назад

      @@JonathanRose24 I had heard this name before but I didn't explore it back then. I will give headless UI a try. This is exactly what I need. 🔥

  • @zXPrImEz
    @zXPrImEz Год назад

    first

  • @nuvotion-live
    @nuvotion-live 9 месяцев назад

    Oh, so that's why React won :/