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