Published
Edited
Jun 20, 2022
2 forks
1 star
Also listed in…
Tips and Utilities
Insert cell
Insert cell
Insert cell
Insert cell
owl = import('https://unpkg.com/@odoo/owl@2.0.0-beta-9/dist/owl.es.js?module')
Insert cell
output = html`<div class="owl"></div>`
Insert cell
class Counter extends owl.Component {
static template = owl.xml`
<button t-on-click="() => state.value = state.value + props.increment">
Click Me! [<t t-esc="state.value"/>]
</button>`;

state = owl.useState({ value: 0 });
}
Insert cell
class Root extends owl.Component {
static template = owl.xml`
<span>Hello Owl </span>
<Counter increment="2"/>`;

static components = { Counter };
}
Insert cell
owl.mount(Root, output);
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more