Move composer note ref sync out of effect

This commit is contained in:
Neil
2026-05-29 03:13:58 -07:00
parent a1a97dac5f
commit 307ad93734
+1 -3
View File
@@ -473,9 +473,7 @@ export function useComposerState(options: UseComposerStateOptions): UseComposerS
// Why: read the latest note inside handleBaseBranchPrSelect without adding
// `note` to its deps (which would rebuild the callback on every keystroke).
const noteRef = useRef<string>(note)
useEffect(() => {
noteRef.current = note
}, [note])
noteRef.current = note
const composerRef = useRef<HTMLDivElement | null>(null)
const promptTextareaRef = useRef<HTMLTextAreaElement | null>(null)
const nameInputRef = useRef<HTMLInputElement | null>(null)