Skip to content

Commit 54b1915

Browse files
perf(web): the thread context drop hook compiles with the React Compiler (#20605)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 41f56d9 commit 54b1915

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/web/src/components/chat/threadContextDrag.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ export function useThreadContextDrop(
2121
active = false;
2222
target.removeEventListener(THREAD_CONTEXT_DROP_EVENT, listener);
2323
};
24-
}, [environmentId, targetKey, targetRef]);
24+
}, [
25+
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- A new environment or target ends the previous listener, so isActive reports false to drops still in flight for it.
26+
environmentId,
27+
targetKey,
28+
targetRef,
29+
]);
2530
}
2631

2732
const DROP_TARGET_ATTRIBUTE = "data-thread-context-drop";

0 commit comments

Comments
 (0)