What Is Lit? - A Web Component Based Framework

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

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

  • @PauloSantos-yu1tn
    @PauloSantos-yu1tn 2 года назад +1

    Very good and nice lib. It works perfectly and it's based only on web components, no additional packages needed. Lightweight. I really enjoy it.

    • @shableep
      @shableep 6 месяцев назад

      you mean…Litweight?

  • @galaxies_dev
    @galaxies_dev 2 года назад +3

    Lit is pretty cool! Compared it with other approaches some years ago and ended up using Stencil as I enjoyed the tooling around it a bit more 🙌

    • @zhongkangshen8768
      @zhongkangshen8768 2 года назад

      I try to use Stencil for building my components library, but there has some issue with its hot module reload when I change css files.

  • @BrickTamlandOfficial
    @BrickTamlandOfficial 2 года назад +3

    lit is on fleek

  • @johntierney3353
    @johntierney3353 2 года назад +4

    My experience has been that web components do not play nice with frameworks that are based on SSR, i.e. Nuxtjs and SvelteKit.

  • @niorad
    @niorad 2 года назад +2

    I'm working with Lit daily since 2 years (medium-complex B2B SPAs) and it's mostly a very positive dev-experience. Sometimes, Checkboxes and Selects won't rerender correctly if their state is modified from outside, but that's more intrinsic to the way custom elements work. No problem though once you get used to it and have your workaround. It's all standard HTML in the end, so you can always hook into and change your elements manually.
    Now with SSR returning to be all the rage, I do hope that at some point there will be: a) a good SSR solution (like Next for React), and b) a way to test WC/LitComponents like React&Enzyme, without having to spin up an actual browser.

  • @flethacker
    @flethacker 2 года назад +1

    Those glasses are lit like a magnifying glass

  • @mhmmdshaz98
    @mhmmdshaz98 2 года назад +1

    Hey, what advantages does this method have compared to compiling web components with Svelte?

    • @JustinFagnani
      @JustinFagnani 2 года назад +7

      For one, you don't need a compiler or any custom toolchain. You write Lit components with either plain JS or plain TS. Lit also doesn't change any JS semantics like Svelte does with modules or labels (for instance a module-level variable is just that in Lit, while it becomes something like an object/class field in Svelte). There have also been bugs in Svelte's web components output that the maintainers have seemed reluctant to fix because they're very anti-web-components.

    • @mhmmdshaz98
      @mhmmdshaz98 2 года назад +1

      @@JustinFagnani Oh, I did not have knowledge about the semantics at all, I'm still in the starting stages of building simple svelte apps and is building a chrome extension using svelte.
      The bugs you mentioned is very true, my first approach trying to compile to a web component by changing the rollup config did not seem to work for reasons that the compiler don't seem to clarify. And issues section was not any help either.
      The anti-web-component agenda is a new info for me.👀.

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

    Every framework says "it's lightweight"... hard to believe anymore.

  • @TheDyingPlant
    @TheDyingPlant 2 года назад

    Asah duh

  • @davidmaxwaterman
    @davidmaxwaterman 2 года назад +1

    Ug. He used the 'f' word! :/

    • @syntaxfm
      @syntaxfm  2 года назад

      What do you mean?