Repository navigation
Fix the Fluent theme IIFE on React 19 and follow up on renderWebChat() - #5971
Open
Eugene (OEvgeny) wants to merge 11 commits into
Open
Eugene (OEvgeny) wants to merge 11 commits into
Eugene (OEvgeny) wants to merge 11 commits into
Conversation
added 11 commits
October 23, 2026 13:44
The IIFE build bundled React DOM 16.8.6 (through renderWebChat() of botframework-webchat) and evaluated it on load against window.React, which crashes with React 19. Like "react", "react-dom" now resolves to window.ReactDOM; the bundled copy was only used by renderWebChat(), which the IIFE build does not export.
static/react-dom.baseline/client.js is never built (React 16 has no react-dom/client), and renderWebChat() does not import react-dom/client: on React 19, the host passes a root from createRoot().
…build Ported from #5955: the page creates its own root with createRoot() and renders <ReactWebChat> with React 19.
…ct-film imports render() by name
Eugene (OEvgeny)
marked this pull request as ready for review
October 23, 2026 22:53
Eugene (OEvgeny)
requested review from
William Wong (compulim),
Chris Whitten (cwhitten) and
TJ Durnford (tdurnford)
as code owners
October 23, 2026 22:53
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Entry
Fixed
Description
The Fluent theme IIFE bundled React DOM 16.8.6 (via
renderWebChat(), which it does not export) and evaluated it againstwindow.React, which throws on React 19; it now useswindow.ReactDOM, likewindow.React. Also folds in #5963's review comments, a docs fix, and React 19 tests.Design
react-domto the page'sReactDOMin the IIFE tsup plugin, likereact; tree-shaking cannot drop it, the bundled module runs on load.Specific Changes
renderWebChat.tsx: split the render schema intolegacyReactDOMSchemaandreactRootSchema, nameReactDOM.createRoot()in the errorfluent-theme/tsup.config.ts,src/external.umd/react-dom.ts: IIFE builds resolvereact-domtowindow.ReactDOMreact19/fluentTheme.iife.html: snapshot 1, Fluent theme on React 19 shows a sent message and the replydocs/HOSTING.md: removereact-dom/clientfrom the baseline import map, it is never builtrenderWebChat.spec.tsx: an error fromroot.render()is thrown synchronouslyreact19/codeBlockCopyButton.html: snapshot 1, the copy button shows "Copied" on React 19react19/*.html: expectReactDOM.version; the React 18 root test spies withjest-mock.changelog/<PR#>-<slug>.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed