Unblock React Compiler for 5 components by removing render-phase mutation (#11543)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
Tomasz Zawadzki
2026-08-31 23:03:13 +02:00
committed by GitHub
parent 0a00392b65
commit bfde8e60c2
6 changed files with 40 additions and 40 deletions
+5 -3
View File
@@ -683,9 +683,11 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
const bundle = state.currentBundleState.bundle as unknown as
SessionBundle | PublicSessionBundle
// @ts-expect-error window type is not declared, debug only
// eslint-disable-next-line react-hooks/immutability
if (__DEV__ && IS_WEB) window.bundle = bundle
useEffect(() => {
if (!__DEV__ || !IS_WEB) return
// @ts-expect-error window type is not declared, debug only
window.bundle = bundle
}, [bundle])
const currentBundleRef = useRef(bundle)
/*