Published
Edited
Apr 19, 2021
4 stars
Insert cell
Insert cell
thing({description: "one"})
Insert cell
thing({description: "two"})
Insert cell
thing({description: "red"})
Insert cell
thing({description: "blue"})
Insert cell
Insert cell
Table(things)
Insert cell
Insert cell
thing = {
mutable things = [];
return function thing(t, invalidation) {
const {description} = t;
mutable things = mutable things.concat(t);
const element = html`<div>Thing ${description}</div>`;
if (invalidation === undefined) invalidation = disposal(element);
invalidation.then(() => mutable things = mutable things.filter(o => o !== t));
return element;
};
}
Insert cell
mutable things = undefined
Insert cell
import {disposal, html, Table} from "@observablehq/inputs"
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