Published
Edited
Oct 19, 2021
Importers
3 stars
Insert cell
Insert cell
tableWithLocalStorage = (data, key) =>
composeTable(
[],
[
(hot) => ({
afterChange: (changes, source) => {
if (source !== "loadData") {
localStorage.setItem(key, JSON.stringify(hot.getSourceData()));
}
}
})
]
)(localStorage.getItem(key) ? JSON.parse(localStorage.getItem(key)) : data)
Insert cell
Insert cell
import { composeTable } from "@gnestor/table-utilities"
Insert cell
import { localStorage } from "@mbostock/safe-local-storage"
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