Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What framework to use in order to build web components: lit-element vs stencil vs SkateJS?

I want to start leveraging http://webcomponents.me W3C standard which is now supported by all major web browsers.

I researched the internet and so far I found following frameworks:

  1. Stencil - Created by ionic. All ionic components use this framework/compiler in order to build native supported web components.

  2. lit-element - Created by Google and is part of Polymer framework.

  3. SkateJS - Don't know how is behind this but it is in top 3 popular web components framework.

Can someone give me advice or opinion which framework is best?

like image 407
Danilo Puric Avatar asked Mar 19 '19 20:03

Danilo Puric


People also ask

Which of the following framework is used for creating Web Components as custom elements?

Lit-html is basically a customizable construction kit for web components. It's “An efficient, expressive, extensible HTML templating library for JavaScript”. Meaning, Lit-html uses JavaScript template strings to create dynamic templates with template literals (example).

Is Lit element a framework?

Lit is a fast, lightweight, reactive framework for building web components that work just about anywhere. Let's get started with Lit. Lit is one of the more interesting front-end JavaScript frameworks for reactive programming.

Is stencil a framework?

Stencil is a compiler that generates Web Components (more specifically, Custom Elements). Stencil combines the best concepts of the most popular frameworks into a simple build-time tool.

Why is stencil not a framework?

Stencil helps developers and teams build and share custom components. Since Stencil generates standards-compliant Web Components, the components you build with Stencil will work with many popular frameworks right out of the box, and can even be used without a framework because they are just Web Components.


1 Answers

If you want to build:

  • Fast
  • Easy-to-debug
  • Cross-browser
  • Framework-agnostic

web components you could also consider using VanillaJS framework :

http://vanilla-js.com/

like image 93
Supersharp Avatar answered Nov 15 '22 04:11

Supersharp