Skip to content

Commit b5d82ac

Browse files
committed
Fix computed to use the hook form
1 parent eb7e57a commit b5d82ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extension/src/components/Graph.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useRef } from "preact/hooks";
2-
import { Signal, computed } from "@preact/signals";
2+
import { Signal, computed, useComputed, useSignal } from "@preact/signals";
33
import {
44
Divider,
55
GraphData,
@@ -15,7 +15,7 @@ export function GraphVisualization() {
1515
const svgRef = useRef<SVGSVGElement>(null);
1616

1717
// Build graph data from updates signal using a computed
18-
const graphData = computed<GraphData>(() => {
18+
const graphData = useComputed<GraphData>(() => {
1919
const rawUpdates = updates.value;
2020
if (!rawUpdates || rawUpdates.length === 0)
2121
return { nodes: [], links: [], components: [] };

0 commit comments

Comments
 (0)