Skip to content

Commit 7a08cdf

Browse files
perf(web): the browser surface slot compiles with the React Compiler (#20542)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 4576827 commit 7a08cdf

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/web/src/browser/BrowserSurfaceSlot.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,13 @@ export function BrowserSurfaceSlot(props: {
8787
useLayoutEffect(() => {
8888
presentationRef.current = { visible, cornerRadius, zIndex };
8989
updateRef.current?.();
90-
}, [cornerRadius, layoutVersion, visible, zIndex]);
90+
}, [
91+
cornerRadius,
92+
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- A layoutVersion bump means the slot moved without resizing, so it re-presents at the new position.
93+
layoutVersion,
94+
visible,
95+
zIndex,
96+
]);
9197

9298
return <div ref={elementRef} className={className} data-browser-surface-slot={tabId} />;
9399
}

0 commit comments

Comments
 (0)