Published
Edited
Oct 9, 2022
Insert cell
Insert cell
Insert cell
notebook
Insert cell
actions = notebook.params.actions ? decodeState(notebook.params.actions) : []
Insert cell
counter = notebook.params.counter ? parseInt(notebook.params.counter) : 0
Insert cell
notebook.withParams(notebook.params).link("Current")
Insert cell
notebook.withParams({ counter: counter + 1, actions: encodeState([...actions, "increment"]) }).link("Increment")
Insert cell
notebook.withParams({ counter: counter - 1, actions: encodeState([...actions, "decrement"]) }).link("Decrement")
Insert cell
notebook.withParams({}).link("Reset")
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