about summary refs log tree commit diff
path: root/src/state/session/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/session/index.tsx')
-rw-r--r--src/state/session/index.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx
index 946c742ad..e6def1fab 100644
--- a/src/state/session/index.tsx
+++ b/src/state/session/index.tsx
@@ -13,6 +13,12 @@ import {useCloseAllActiveElements} from '#/state/util'
 
 let __globalAgent: BskyAgent = PUBLIC_BSKY_AGENT
 
+/**
+ * NOTE
+ * Never hold on to the object returned by this function.
+ * Call `getAgent()` at the time of invocation to ensure
+ * that you never have a stale agent.
+ */
 export function getAgent() {
   return __globalAgent
 }