Files
t3code/apps/web/src/components/desktop/RunningThreadKeepAlive.tsx
T
2026-09-24 21:57:35 -07:00

15 lines
471 B
TypeScript

import { useAtomMount } from "@effect/atom-react";
import { runningThreadKeepAliveAtom } from "../../state/threads";
/**
* Desktop only. Keeps each running thread subscribed in every enabled
* environment, so opening one shows live state without a replay or a sync
* status flash. It mounts the atom without reading it, so thread updates
* never re-render.
*/
export function RunningThreadKeepAlive() {
useAtomMount(runningThreadKeepAliveAtom);
return null;
}