feat(site): update content

This commit is contained in:
Ayo 2023-11-26 19:50:29 +01:00
parent 766cf65b4a
commit 3e8334f2c1
3 changed files with 8 additions and 4 deletions

View file

@ -29,7 +29,7 @@
<p>
By extending our base class, you get an easy authoring experience as you would expect in writing your components:</p>
<ul>
<li>A reactive <code-block inline>props</code-block> API that synchronizes your components' property values and UI</li>
<li>A signals-like <code-block inline>props</code-block> API that synchronizes your components' property values and UI</li>
<li>Sensible life-cycle hooks that you understand and remember</li>
<li>Extensible templates & renderer (examples in-progress)</li>
<li>Provided out-of-the-box with <a href="https://ayco.io/gh/McFly">McFly</a>, a powerful no-framework framework</li>

View file

@ -4,8 +4,12 @@ import WebComponent from "../src/WebComponent.js";
export class Counter extends WebComponent {
static properties = ["count"];
onInit() {
this.props.count = 0;
this.props.count = 1;
this.onclick = ()=> ++this.props.count
let double = () => this.props.count * 2;
console.log(double());
this.props.count = 3;
console.log(double());
}
get template() {
return `<button>${this.props.count}</button>`;

View file

@ -18,7 +18,7 @@
<div>
Counter: <my-counter></my-counter>
</div>
<div>
<!-- <div>
Toggle: <my-toggle></my-toggle>
</div>
<div>
@ -26,6 +26,6 @@
</div>
<div>
Object: <my-object />
</div>
</div> -->
</body>
</html>