We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb7e57a commit b5d82acCopy full SHA for b5d82ac
extension/src/components/Graph.tsx
@@ -1,5 +1,5 @@
1
import { useRef } from "preact/hooks";
2
-import { Signal, computed } from "@preact/signals";
+import { Signal, computed, useComputed, useSignal } from "@preact/signals";
3
import {
4
Divider,
5
GraphData,
@@ -15,7 +15,7 @@ export function GraphVisualization() {
15
const svgRef = useRef<SVGSVGElement>(null);
16
17
// Build graph data from updates signal using a computed
18
- const graphData = computed<GraphData>(() => {
+ const graphData = useComputed<GraphData>(() => {
19
const rawUpdates = updates.value;
20
if (!rawUpdates || rawUpdates.length === 0)
21
return { nodes: [], links: [], components: [] };
0 commit comments