Published
Edited
May 27, 2021
2 stars
Insert cell
Insert cell
import {app, html} from '@yysun/apprun'
Insert cell
state = {
window.setInterval(() => { app.run('timer') }, 1000);
return new Date();
}
Insert cell
view = state => html`<h3>${state.toLocaleTimeString()}</h3>`;
Insert cell
update = { return {timer: state => new Date()} }
Insert cell
app.start(document.createElement('div'), state, view, update).element;
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