We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2ce676 commit 0ca3851Copy full SHA for 0ca3851
1 file changed
docs/getting-started.md
@@ -137,11 +137,9 @@ The first is to server-side render (SSR) plots. This minimizes distracting reflo
137
import * as Plot from "@observablehq/plot";
138
import {createElement as h} from "react";
139
140
-const PlotFigure = ({ options: { document = new Document(), ...options } }) => {
141
- return Plot.plot({ document, ...options }).toHyperScript();
142
-};
143
-
144
-export default PlotFigure;
+export default function PlotFigure({options}) {
+ return Plot.plot({...options, document: new Document()}).toHyperScript();
+}
145
```
146
:::
147
0 commit comments