Public
Edited
Dec 11, 2022
2 stars
Insert cell
Insert cell
Insert cell
mount(Counter)
Insert cell
Counter = ({
setup () {
const {ref} = vue

const counter = ref(0)

const increment = () => {
counter.value++
}
return {counter, increment}
},
template: `
<button @click="increment">Clicked: {{ counter }} times</button>
`
})
Insert cell
mount = (RootComponent) => Generators.observe(notify => {
const { createApp } = vue

const app = createApp(RootComponent)

const root = document.createElement('div')
app.mount(root)

notify(root)
return () => {
app.unmount()
}
})
Insert cell
vue = import('vue/dist/vue.esm-browser.prod.js')
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