@devries-cameron20 / t3code-1 / commits / 54d0900627
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

perf(web): the device state hooks compile without manual memoization (#20613)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 16, 2026 at 22:01 UTC 54d090062732280987a1f3e1515e44491618d063
1 file changed +3 -8
apps/web/src/state/device.ts
+3 -8
@@ -1,4 +1,3 @@
1 -import { useMemo } from "react";
1 import { useAtomValue } from "@effect/atom-react";
2 import { createDeviceEnvironmentAtoms } from "@t3tools/client-runtime/state/device";
3 import {
@@ -58,13 +57,9 @@ export function useDeviceHubAccess(
57 const result = useAtomValue(
58 environmentId === null ? EMPTY_ACCESS_ATOM : deviceHubAccessAtom(environmentId),
59 );
61 - return useMemo(
62 - () =>
63 - AsyncResult.isSuccess(result)
64 - ? { ...result.value, query: { ...result.value.query, hostId } }
65 - : null,
66 - [result, hostId],
67 - );
60 + return AsyncResult.isSuccess(result)
61 + ? { ...result.value, query: { ...result.value.query, hostId } }
62 + : null;
63 }
64
65 const EMPTY_ACCESS_ATOM = Atom.make(AsyncResult.initial<DeviceHubAccess, never>()).pipe(