Skip to content

Commit 5c28ad6

Browse files
perf(web): the managed relay hooks compile without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 7111501 commit 5c28ad6

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎apps/web/reactCompiledFiles.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,5 @@ export const REACT_COMPILED_FILES = [
9696
"apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx",
9797
"apps/web/src/components/ThreadTerminalDrawer.tsx",
9898
"apps/web/src/components/settings/SettingsPanels.tsx",
99+
"apps/web/src/cloud/managedRelayState.ts",
99100
] as const;

‎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)