rename demo example into benchmarks

This commit is contained in:
Géry Debongnie
2019-03-19 13:55:27 +01:00
parent 91e7e00f97
commit 6a2e4dbf2f
8 changed files with 6 additions and 6 deletions
+18
View File
@@ -0,0 +1,18 @@
export class Counter extends odoo.core.Component {
inlineTemplate = `
<div>
<button t-on-click="increment(-1)">-</button>
<span style="font-weight:bold">Value: <t t-esc="state.counter"/></span>
<button t-on-click="increment(1)">+</button>
</div>`;
constructor(parent, props) {
super(parent, props);
this.state = {
counter: props.initialState || 0
};
}
increment(delta) {
this.updateState({ counter: this.state.counter + delta });
}
}