diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index 6a04a8a0ff..8ca347ae41 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -24,11 +24,14 @@ import {readLabelers} from './agent-config' let __globalAgent: BskyAgent = PUBLIC_BSKY_AGENT export function useAgent() { - return { - getAgent() { - return __globalAgent - }, - } + return React.useMemo( + () => ({ + getAgent() { + return __globalAgent + }, + }), + [], + ) } export type SessionAccount = persisted.PersistedAccount