Это видео недоступно.
Сожалеем об этом.
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
It would b useful to show the finished component first so we know what you are working towards
Yes, you are right - thanks for the suggestion!
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!
@Khaldoun Al-nuaimi - you are right. It's tough to be atractive when your competitors offer everything under the sun 😅
Have you guys tried alpinejs?
@Imagine about - I actually have a video on Alpine - Alpine JS is pretty useful
ruclips.net/video/CPXUsbgv_V0/видео.html
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.
@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.
I loved how simple you kept it!
@luciopoveda7716 Thank you!
Awesome video!
It would be nice to see Lit + SASS + Tailwind boilerplate tutorial ;)
Thank you!
Noted - will work on someting!
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!
Thanks for the kind words and for the feedback! It really helps!
Does lit have something like before destroy? Or before unmount? lifecycle method? I only see disconnectedCallback.
@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?
@@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.
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?
Facing the same issue!!!
@@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 🔥. 😎
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
@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" 😅
@@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. 🔥
first
nice ✌️
Oh, so that's why React won :/
😅