docs: update readme

This commit is contained in:
dntzhang 2019-08-29 11:18:26 +08:00
parent 6b961620f3
commit f1a50d60a3
3 changed files with 18 additions and 3 deletions

View File

@ -30,7 +30,12 @@ define('my-counter', ['count'], _ => (
<span>{_.store.data.count}</span>
<button onClick={_.store.add}>+</button>
</div>
))
), {
css: `span { color: red; }`,
installed() {
console.log('installed')
}
})
render(<my-counter />, 'body', new Store)
```

View File

@ -30,7 +30,12 @@ define('my-counter', ['count'], _ => (
<span>{_.store.data.count}</span>
<button onClick={_.store.add}>+</button>
</div>
))
), {
css: `span { color: red; }`,
installed() {
console.log('installed')
}
})
render(<my-counter />, 'body', new Store)
```

View File

@ -31,7 +31,12 @@ define('my-counter', ['count'], _ => (
<span>{_.store.data.count}</span>
<button onClick={_.store.add}>+</button>
</div>
))
), {
css: `span { color: red; }`,
installed() {
console.log('installed')
}
})
render(<my-counter />, 'body', new Store)
```