The web component tool kit.
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 actions like "renders" to the micro task queue
- bind functions to elements
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-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 for event listerners and data stores. This fully encapsulates a web component API (aside from required lifecycle methods).
Wctk
is released under the BSD-3 Clause License.