lit-html-0.1.2 doesn't have any documentation.
lit-html-rs
A Rust library for using the HTML template library lit-html created by the Google Polymer project.
this library is still in very early stages
[]
= "0"
Basics
lit-html
works by creating templates that efficiently render to the DOM. When you are building a TemplateData
object your data is being moved from WebAssembly into an object in JavaScript that can be used by the lit-html
template.
You can put the following data on TemplateData:
- strings
- numbers
- booleans
- callbacks functions
use *;
use *;
See it working here.
Counter
You can build up complex UI by creating Templates that contain other data bound templates. lit-html
efficiently manipulates the DOM when data changes.
use *;
use *;
static mut COUNT: u32 = 0;
See it working here.