feat(site): update content
This commit is contained in:
parent
766cf65b4a
commit
3e8334f2c1
3 changed files with 8 additions and 4 deletions
|
@ -29,7 +29,7 @@
|
||||||
<p>
|
<p>
|
||||||
By extending our base class, you get an easy authoring experience as you would expect in writing your components:</p>
|
By extending our base class, you get an easy authoring experience as you would expect in writing your components:</p>
|
||||||
<ul>
|
<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>Sensible life-cycle hooks that you understand and remember</li>
|
||||||
<li>Extensible templates & renderer (examples in-progress)</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>
|
<li>Provided out-of-the-box with <a href="https://ayco.io/gh/McFly">McFly</a>, a powerful no-framework framework</li>
|
||||||
|
|
|
@ -4,8 +4,12 @@ import WebComponent from "../src/WebComponent.js";
|
||||||
export class Counter extends WebComponent {
|
export class Counter extends WebComponent {
|
||||||
static properties = ["count"];
|
static properties = ["count"];
|
||||||
onInit() {
|
onInit() {
|
||||||
this.props.count = 0;
|
this.props.count = 1;
|
||||||
this.onclick = ()=> ++this.props.count
|
this.onclick = ()=> ++this.props.count
|
||||||
|
let double = () => this.props.count * 2;
|
||||||
|
console.log(double());
|
||||||
|
this.props.count = 3;
|
||||||
|
console.log(double());
|
||||||
}
|
}
|
||||||
get template() {
|
get template() {
|
||||||
return `<button>${this.props.count}</button>`;
|
return `<button>${this.props.count}</button>`;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div>
|
<div>
|
||||||
Counter: <my-counter></my-counter>
|
Counter: <my-counter></my-counter>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<!-- <div>
|
||||||
Toggle: <my-toggle></my-toggle>
|
Toggle: <my-toggle></my-toggle>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -26,6 +26,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
Object: <my-object />
|
Object: <my-object />
|
||||||
</div>
|
</div> -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue