The web component tool kit.
Wctk-js
is a concise way to create web components with:
- No decorators
- No (unncessary) inheritance
- No extra dependencies
Wctk-js
provides support for:
- Reactivity
- SSR
- Events
- Forms
- Subscriptions
All features are optional and compositional.
Wctk-js
supports #private
functions as callbacks and fully encapsulates a web component API (aside from required lifecycle methods).
npm install --save-dev https://github.com/w-lfpup/wctk-js/
A handful of facades:
- create shadow dom and manage form values
- listen to events
- subscribe to external data stores
- push renders to the microtask queue
- bind functions to elements
- query the shadow dom
The following examples demonstrate several common SSR use cases:
- a counter with initial state in the DOM (code).
- a stopwatch with initial state in the Shadow DOM (code).
- a form associated element (code).
Wctk
is released under the BSD-3 Clause License.