Public
Edited
Feb 17, 2023
Insert cell
Insert cell
import {
render,
useState,
jsx,
useCallback,
component
} from "@j-f1/react"
Insert cell
reactflow = import("https://esm.sh/reactflow@11.5.6")
Insert cell
ReactFlow = reactflow.ReactFlow
Insert cell
Controls = reactflow.Controls
Insert cell
Background = reactflow.Background
Insert cell
<link href="https://unpkg.com/browse/reactflow@11.5.6/dist/style.css" rel="stylesheet" />
Insert cell
viewof rf = render(({ useSetter }) => {
// const [value, setValue] = useState("");
// useSetter(value);

const nodes = [
{
id: "1",
data: { label: "Hello" },
position: { x: 0, y: 0 },
type: "input"
},
{
id: "2",
data: { label: "World" },
position: { x: 100, y: 100 }
}
];

return jsx`
<div>
<${ReactFlow} nodes=${nodes}>
<${Background} />
<${Controls} />
<//>
</div>
`;
})
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