diff --git a/readme.md b/readme.md index acff9f3..b8e7e52 100644 --- a/readme.md +++ b/readme.md @@ -10,52 +10,60 @@ templating. ## Overview ```js +const text = new State({value: "Skooma is cool"}) +setTimeout(() => {text.value = "Skooma is awesome!"}, 1e5) + document.body.append(html.div( html.h1("Hello, World!"), - html.p("Skooma is cool", {class: "amazing"}), - html.button("Show Proof", click: event => { alert("It's true!") }) + html.p(text, {class: "amazing"}), + html.button("Show Proof", {click: event => { alert("It's true!") }}) )) ``` ## Interface / Examples -### HTML generation +### Basic DOM generation + +Accessing the `html` proxy with any string key returns a new node generator +function: ```js -html.div() -// Creates a
element -html.div("hello", "world") -//