@reactively/lit
v0.0.3
Published
Reactively is a library for fine grained reactive programming.
Downloads
3
Readme
Reactively
Reactively is a library for fine grained reactive programming.
See documentation for details.
This part of the library (@reactively/lit
)
provides integration with the Lit library for web components.
Here is an example using Lit and @reactively together.
- Inherit from
ReactiveLitElement
in place ofLitElement
- Implement
reactiveRender()
instead ofrender()
. (This enables@reactively/lit
to track the reactive sources used while rendering, and to trigger re-rendering when necessary.) - Choose how to annotate your reactive properties:
@reactiveProperty
properties are reactive and visible as lit web component properties.@reactively
properties are reactive but not web component properties.
- Call
stabilizeContinously()
once when you start your application, so that allReactiveLitElement
instances will re-render() automatically.