Published
Edited
May 27, 2021
1 fork
1 star
Insert cell
md`# AppRun with JSX`
Insert cell
import {app, jsx} from '@yysun/apprun'
Insert cell
state = {
window.setInterval(() => { app.run('timer') }, 1000);
return new Date();
}
Insert cell
view = jsx`state => <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