#buildwithlit โ Public Fediverse posts
Live and recent posts from across the Fediverse tagged #buildwithlit, aggregated by home.social.
-
One thing about web components that seems to take some people a while to grok is that a WC library like Lit is just an implementation detail, and from the outside it's all just standard HTML/DOM.
ie, you don't need to use Lit to instantiate Lit components. Plain DOM APIs work.
#webComponents #lit #webDev #javaScript #js #customElements #buildWithLit #frontend #html #dom #components
-
One thing about web components that seems to take some people a while to grok is that a WC library like Lit is just an implementation detail, and from the outside it's all just standard HTML/DOM.
ie, you don't need to use Lit to instantiate Lit components. Plain DOM APIs work.
#webComponents #lit #webDev #javaScript #js #customElements #buildWithLit #frontend #html #dom #components
-
One thing about web components that seems to take some people a while to grok is that a WC library like Lit is just an implementation detail, and from the outside it's all just standard HTML/DOM.
ie, you don't need to use Lit to instantiate Lit components. Plain DOM APIs work.
#webComponents #lit #webDev #javaScript #js #customElements #buildWithLit #frontend #html #dom #components
-
One thing about web components that seems to take some people a while to grok is that a WC library like Lit is just an implementation detail, and from the outside it's all just standard HTML/DOM.
ie, you don't need to use Lit to instantiate Lit components. Plain DOM APIs work.
#webComponents #lit #webDev #javaScript #js #customElements #buildWithLit #frontend #html #dom #components
-
One thing about web components that seems to take some people a while to grok is that a WC library like Lit is just an implementation detail, and from the outside it's all just standard HTML/DOM.
ie, you don't need to use Lit to instantiate Lit components. Plain DOM APIs work.
#webComponents #lit #webDev #javaScript #js #customElements #buildWithLit #frontend #html #dom #components
-
How I implemented #webmentions rendering on my #weblog? I prototyped it with lit-html #buildWithLit then I reimplemented it as a reusable #webcomponent. More in this blog post: https://www.rarous.net/weblog/2024/02/25/zobrazovani-webmentions-ve-strance.html
-
How I implemented #webmentions rendering on my #weblog? I prototyped it with lit-html #buildWithLit then I reimplemented it as a reusable #webcomponent. More in this blog post: https://www.rarous.net/weblog/2024/02/25/zobrazovani-webmentions-ve-strance.html
-
Announcing Platformer: a set of libraries to help implement:
โข attribute reflection in web components following the HTML specification
โข WebIDL type coercions for your public JS APIs (including web component properties)https://github.com/tbroyer/platformer
Comes with ECMAScript decorators (compatible with TypeScript 5.2+ and Babel) for vanilla custom elements and Lit elements.
Currently not published on NPM (as I'm still evaluating whether all of this is a good thing worth pursuing ๐ feedback welcome!)
-
Announcing Platformer: a set of libraries to help implement:
โข attribute reflection in web components following the HTML specification
โข WebIDL type coercions for your public JS APIs (including web component properties)https://github.com/tbroyer/platformer
Comes with ECMAScript decorators (compatible with TypeScript 5.2+ and Babel) for vanilla custom elements and Lit elements.
Currently not published on NPM (as I'm still evaluating whether all of this is a good thing worth pursuing ๐ feedback welcome!)
-
Announcing Platformer: a set of libraries to help implement:
โข attribute reflection in web components following the HTML specification
โข WebIDL type coercions for your public JS APIs (including web component properties)https://github.com/tbroyer/platformer
Comes with ECMAScript decorators (compatible with TypeScript 5.2+ and Babel) for vanilla custom elements and Lit elements.
Currently not published on NPM (as I'm still evaluating whether all of this is a good thing worth pursuing ๐ feedback welcome!)
-
Announcing Platformer: a set of libraries to help implement:
โข attribute reflection in web components following the HTML specification
โข WebIDL type coercions for your public JS APIs (including web component properties)https://github.com/tbroyer/platformer
Comes with ECMAScript decorators (compatible with TypeScript 5.2+ and Babel) for vanilla custom elements and Lit elements.
Currently not published on NPM (as I'm still evaluating whether all of this is a good thing worth pursuing ๐ feedback welcome!)
-
Announcing Platformer: a set of libraries to help implement:
โข attribute reflection in web components following the HTML specification
โข WebIDL type coercions for your public JS APIs (including web component properties)https://github.com/tbroyer/platformer
Comes with ECMAScript decorators (compatible with TypeScript 5.2+ and Babel) for vanilla custom elements and Lit elements.
Currently not published on NPM (as I'm still evaluating whether all of this is a good thing worth pursuing ๐ feedback welcome!)
-
โฌ๏ธ
Updated my post following those tests, as some code samples were wrong and I learned a few new things writing the tests:https://blog.ltgt.net/web-component-properties/
BTW, also added FAST implementations to the test.
-
โฌ๏ธ
Updated my post following those tests, as some code samples were wrong and I learned a few new things writing the tests:https://blog.ltgt.net/web-component-properties/
BTW, also added FAST implementations to the test.
-
Built-in HTML elements' properties all share similar behaviors, that don't come for free when you write your own custom elements. Let's see what those behaviors are, why you'd want to implement them in your web components, and how to do it, including how some web component libraries actually don't allow you to mimic those behaviors.
-
Built-in HTML elements' properties all share similar behaviors, that don't come for free when you write your own custom elements. Let's see what those behaviors are, why you'd want to implement them in your web components, and how to do it, including how some web component libraries actually don't allow you to mimic those behaviors.
-
โฌ๏ธ
Updated my post following those tests, as some code samples were wrong and I learned a few new things writing the tests:https://blog.ltgt.net/web-component-properties/
BTW, also added FAST implementations to the test.
-
โฌ๏ธ
Updated my post following those tests, as some code samples were wrong and I learned a few new things writing the tests:https://blog.ltgt.net/web-component-properties/
BTW, also added FAST implementations to the test.
-
โฌ๏ธ
Updated my post following those tests, as some code samples were wrong and I learned a few new things writing the tests:https://blog.ltgt.net/web-component-properties/
BTW, also added FAST implementations to the test.
-
For those interested, I just published on GitHub a series of tests for reflecting attributes in web components (see https://blog.ltgt.net/web-component-properties/ for the rationale, I'll update it soon following those tests), reusing the same tests as used by browsers for built-in elements.
Tests include (for now) vanilla custom elements and Lit custom elements. -
For those interested, I just published on GitHub a series of tests for reflecting attributes in web components (see https://blog.ltgt.net/web-component-properties/ for the rationale, I'll update it soon following those tests), reusing the same tests as used by browsers for built-in elements.
Tests include (for now) vanilla custom elements and Lit custom elements. -
For those interested, I just published on GitHub a series of tests for reflecting attributes in web components (see https://blog.ltgt.net/web-component-properties/ for the rationale, I'll update it soon following those tests), reusing the same tests as used by browsers for built-in elements.
Tests include (for now) vanilla custom elements and Lit custom elements. -
For those interested, I just published on GitHub a series of tests for reflecting attributes in web components (see https://blog.ltgt.net/web-component-properties/ for the rationale, I'll update it soon following those tests), reusing the same tests as used by browsers for built-in elements.
Tests include (for now) vanilla custom elements and Lit custom elements. -
For those interested, I just published on GitHub a series of tests for reflecting attributes in web components (see https://blog.ltgt.net/web-component-properties/ for the rationale, I'll update it soon following those tests), reusing the same tests as used by browsers for built-in elements.
Tests include (for now) vanilla custom elements and Lit custom elements. -
Built-in HTML elements' properties all share similar behaviors, that don't come for free when you write your own custom elements. Let's see what those behaviors are, why you'd want to implement them in your web components, and how to do it, including how some web component libraries actually don't allow you to mimic those behaviors.
-
Built-in HTML elements' properties all share similar behaviors, that don't come for free when you write your own custom elements. Let's see what those behaviors are, why you'd want to implement them in your web components, and how to do it, including how some web component libraries actually don't allow you to mimic those behaviors.
-
Built-in HTML elements' properties all share similar behaviors, that don't come for free when you write your own custom elements. Let's see what those behaviors are, why you'd want to implement them in your web components, and how to do it, including how some web component libraries actually don't allow you to mimic those behaviors.
-
@molily @sir_pepe Fwiw, this actually looks a lot like Lit's ReactiveElement: @property and @state-annotated properties become reactive and trigger a call to the update() method where you can update your element the way you want it.
LitElement extends ReactiveElement to render using lit-html, but ReactiveElement can be used standalone.Btw, ReactiveElement also supports reactive controllers that are slowly spreading to other libraries: https://github.com/webcomponents-cg/community-protocols/issues/27
poke @justinfagnani
-
@molily @sir_pepe Fwiw, this actually looks a lot like Lit's ReactiveElement: @property and @state-annotated properties become reactive and trigger a call to the update() method where you can update your element the way you want it.
LitElement extends ReactiveElement to render using lit-html, but ReactiveElement can be used standalone.Btw, ReactiveElement also supports reactive controllers that are slowly spreading to other libraries: https://github.com/webcomponents-cg/community-protocols/issues/27
poke @justinfagnani
-
@molily @sir_pepe Fwiw, this actually looks a lot like Lit's ReactiveElement: @property and @state-annotated properties become reactive and trigger a call to the update() method where you can update your element the way you want it.
LitElement extends ReactiveElement to render using lit-html, but ReactiveElement can be used standalone.Btw, ReactiveElement also supports reactive controllers that are slowly spreading to other libraries: https://github.com/webcomponents-cg/community-protocols/issues/27
poke @justinfagnani
-
@molily @sir_pepe Fwiw, this actually looks a lot like Lit's ReactiveElement: @property and @state-annotated properties become reactive and trigger a call to the update() method where you can update your element the way you want it.
LitElement extends ReactiveElement to render using lit-html, but ReactiveElement can be used standalone.Btw, ReactiveElement also supports reactive controllers that are slowly spreading to other libraries: https://github.com/webcomponents-cg/community-protocols/issues/27
poke @justinfagnani
-
@molily @sir_pepe Fwiw, this actually looks a lot like Lit's ReactiveElement: @property and @state-annotated properties become reactive and trigger a call to the update() method where you can update your element the way you want it.
LitElement extends ReactiveElement to render using lit-html, but ReactiveElement can be used standalone.Btw, ReactiveElement also supports reactive controllers that are slowly spreading to other libraries: https://github.com/webcomponents-cg/community-protocols/issues/27
poke @justinfagnani
-
It's cool that #Lit is integrating with #Signals.
It feels like we've been circling around this design pattern for decades; they've been called Observables, Pub/Sub, State, Context, etc.
STOKED to hear that there's discussion around standardizing and adding Signals to the #webPlatform!
https://www.youtube.com/live/ri9FEl_hRTc?si=-oztbFGgLG0f9aXJ&t=1636
#webDev #lit #litHTML #litElement #buildWithLit #javaScript #web #react #preact #js #reactjs
-
It's cool that #Lit is integrating with #Signals.
It feels like we've been circling around this design pattern for decades; they've been called Observables, Pub/Sub, State, Context, etc.
STOKED to hear that there's discussion around standardizing and adding Signals to the #webPlatform!
https://www.youtube.com/live/ri9FEl_hRTc?si=-oztbFGgLG0f9aXJ&t=1636
#webDev #lit #litHTML #litElement #buildWithLit #javaScript #web #react #preact #js #reactjs
-
It's cool that #Lit is integrating with #Signals.
It feels like we've been circling around this design pattern for decades; they've been called Observables, Pub/Sub, State, Context, etc.
STOKED to hear that there's discussion around standardizing and adding Signals to the #webPlatform!
https://www.youtube.com/live/ri9FEl_hRTc?si=-oztbFGgLG0f9aXJ&t=1636
#webDev #lit #litHTML #litElement #buildWithLit #javaScript #web #react #preact #js #reactjs
-
It's cool that #Lit is integrating with #Signals.
It feels like we've been circling around this design pattern for decades; they've been called Observables, Pub/Sub, State, Context, etc.
STOKED to hear that there's discussion around standardizing and adding Signals to the #webPlatform!
https://www.youtube.com/live/ri9FEl_hRTc?si=-oztbFGgLG0f9aXJ&t=1636
#webDev #lit #litHTML #litElement #buildWithLit #javaScript #web #react #preact #js #reactjs
-
It's cool that #Lit is integrating with #Signals.
It feels like we've been circling around this design pattern for decades; they've been called Observables, Pub/Sub, State, Context, etc.
STOKED to hear that there's discussion around standardizing and adding Signals to the #webPlatform!
https://www.youtube.com/live/ri9FEl_hRTc?si=-oztbFGgLG0f9aXJ&t=1636
#webDev #lit #litHTML #litElement #buildWithLit #javaScript #web #react #preact #js #reactjs
-
It's super cool that #Lit is supporting standard #javaScript #decorators, but I'm still not going to use them!
Maybe one day when they don't need to be transpiled anymore.
-
It's super cool that #Lit is supporting standard #javaScript #decorators, but I'm still not going to use them!
Maybe one day when they don't need to be transpiled anymore.
-
It's super cool that #Lit is supporting standard #javaScript #decorators, but I'm still not going to use them!
Maybe one day when they don't need to be transpiled anymore.
-
It's super cool that #Lit is supporting standard #javaScript #decorators, but I'm still not going to use them!
Maybe one day when they don't need to be transpiled anymore.
-
It's super cool that #Lit is supporting standard #javaScript #decorators, but I'm still not going to use them!
Maybe one day when they don't need to be transpiled anymore.
-
Here's a Connect 4 demo with Preact signals and Lit, based on @jaffathecake's one in Preact (https://piaille.fr/@jaffathecake@mastodon.social/110111677805867133). Zero update after the first render. All changes are direct-to-DOM.
Most of the code is copied from Jake's demo; I added a small Lit directive to achieve the direct-to-DOM that's integrated into Preact.
https://lit.dev/playground/#gist=a95902c8db543d453a66839277052502
/poke @justinfagnani
-
Here's a Connect 4 demo with Preact signals and Lit, based on @jaffathecake's one in Preact (https://piaille.fr/@jaffathecake@mastodon.social/110111677805867133). Zero update after the first render. All changes are direct-to-DOM.
Most of the code is copied from Jake's demo; I added a small Lit directive to achieve the direct-to-DOM that's integrated into Preact.
https://lit.dev/playground/#gist=a95902c8db543d453a66839277052502
/poke @justinfagnani
-
Here's a Connect 4 demo with Preact signals and Lit, based on @jaffathecake's one in Preact (https://piaille.fr/@jaffathecake@mastodon.social/110111677805867133). Zero update after the first render. All changes are direct-to-DOM.
Most of the code is copied from Jake's demo; I added a small Lit directive to achieve the direct-to-DOM that's integrated into Preact.
https://lit.dev/playground/#gist=a95902c8db543d453a66839277052502
/poke @justinfagnani
-
Here's a Connect 4 demo with Preact signals and Lit, based on @jaffathecake's one in Preact (https://piaille.fr/@jaffathecake@mastodon.social/110111677805867133). Zero update after the first render. All changes are direct-to-DOM.
Most of the code is copied from Jake's demo; I added a small Lit directive to achieve the direct-to-DOM that's integrated into Preact.
https://lit.dev/playground/#gist=a95902c8db543d453a66839277052502
/poke @justinfagnani
-
Here's a Connect 4 demo with Preact signals and Lit, based on @jaffathecake's one in Preact (https://piaille.fr/@jaffathecake@mastodon.social/110111677805867133). Zero update after the first render. All changes are direct-to-DOM.
Most of the code is copied from Jake's demo; I added a small Lit directive to achieve the direct-to-DOM that's integrated into Preact.
https://lit.dev/playground/#gist=a95902c8db543d453a66839277052502
/poke @justinfagnani
-
My base experience with Lit has been OK so far, but integration with #VSCode and #WithAstro seems to be not great -- as code completion for custom properties doesn't seem to work.
The editor treats the web component as just a plain-old component, with nothing custom (and shows warnings about the properties). My searching hasn't provided a way to add extra typing info.
There are an enormous number of moving parts here .... ๐
-
My base experience with Lit has been OK so far, but integration with #VSCode and #WithAstro seems to be not great -- as code completion for custom properties doesn't seem to work.
The editor treats the web component as just a plain-old component, with nothing custom (and shows warnings about the properties). My searching hasn't provided a way to add extra typing info.
There are an enormous number of moving parts here .... ๐
-
My base experience with Lit has been OK so far, but integration with #VSCode and #WithAstro seems to be not great -- as code completion for custom properties doesn't seem to work.
The editor treats the web component as just a plain-old component, with nothing custom (and shows warnings about the properties). My searching hasn't provided a way to add extra typing info.
There are an enormous number of moving parts here .... ๐