diff --git a/README.md b/README.md index 0ec68bc4..771d7f02 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,16 @@ find some more information [here](doc/comparison.md). Here is a short example to illustrate interactive widgets: +```xml + + + +``` + ```javascript -class ClickCounter extends owl.Component { +class Counter extends owl.Component { state = { value: 0 }; increment() { @@ -43,17 +51,14 @@ class ClickCounter extends owl.Component { } } -const TEMPLATES = ` - `; - const qweb = new owl.QWeb(TEMPLATES); -const counter = new ClickCounter({ qweb }); +const counter = new Counter({ qweb }); counter.mount(document.body); ``` -More interesting examples can be found on the [playground](https://odoo.github.io/owl/playground) application. +Note that we assume here that the xml templates are available in the `TEMPLATES` +string. More interesting examples can be found on the +[playground](https://odoo.github.io/owl/playground) application. ## Installing/Building