Platform
Resources
Pricing
Sign in
Get started
senritsu
Workspace
Fork
Public
By
senritsu
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Counter
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mount
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
vue
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML