Skip to content

Commit 22585fd

Browse files
perf(web): the managed relay hooks compile without manual memoization (pingdotgg#20552)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent b78296a commit 22585fd

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎apps/web/src/cloud/managedRelayState.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import * as Context from "effect/Context";
1919
import * as Effect from "effect/Effect";
2020
import * as Layer from "effect/Layer";
2121
import { AsyncResult, Atom } from "effect/reactivity";
22-
import { useCallback, useEffect } from "react";
22+
import { useEffect } from "react";
2323

2424
import { runtime } from "../lib/runtime";
2525
import { appAtomRegistry } from "../rpc/atomRegistry";
@@ -75,11 +75,11 @@ export function useManagedRelayEnvironments() {
7575
});
7676
}
7777
}, [snapshot.error, snapshot.errorTraceId]);
78-
const refresh = useCallback(() => {
78+
const refresh = () => {
7979
if (accountId) {
8080
managedRelayQueryManager.refreshEnvironments(appAtomRegistry, accountId);
8181
}
82-
}, [accountId]);
82+
};
8383

8484
return {
8585
...snapshot,
@@ -102,11 +102,11 @@ export function useManagedRelayDevices() {
102102
});
103103
}
104104
}, [snapshot.error, snapshot.errorTraceId]);
105-
const refresh = useCallback(() => {
105+
const refresh = () => {
106106
if (accountId) {
107107
managedRelayQueryManager.refreshDevices(appAtomRegistry, accountId);
108108
}
109-
}, [accountId]);
109+
};
110110

111111
return {
112112
...snapshot,

0 commit comments

Comments
 (0)