Enable React Compiler for Portal (lazy-ref → useState)#8119
Enable React Compiler for Portal (lazy-ref → useState)#8119mattcosta7 wants to merge 49 commits into
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com> Co-authored-by: Josh Black <joshblack@github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
…formance/code quality (#7506) Co-authored-by: Tyler Jones <tylerjdev@github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: iansan5653 <2294248+iansan5653@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: hectahertz <24622853+hectahertz@users.noreply.github.com> Co-authored-by: Jon Rohan <yes@jonrohan.codes> Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: iansan5653 <2294248+iansan5653@users.noreply.github.com> Co-authored-by: Ian Sanders <iansan5653@github.com>
Co-authored-by: primer[bot] <119360173+primer[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…7.2.0 (#8077) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… and SideNav (#8052) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com> Co-authored-by: Jon Rohan <yes@jonrohan.codes>
… plugin for Rolldown (#8044)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…pdates (#8102) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com> Co-authored-by: Josh Black <joshblack@github.com>
Co-authored-by: primer[bot] <119360173+primer[bot]@users.noreply.github.com>
Co-authored-by: Marie Lucca <40550942+francinelucca@users.noreply.github.com> Co-authored-by: Manuel Puyol <manuelpuyol@github.com>
🦋 Changeset detectedLatest commit: 806aa6a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
… cleanup, and onMount
|
🤖 Lint issues have been automatically fixed and committed to this PR. |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com> Co-authored-by: Josh Black <joshblack@github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
# Conflicts: # packages/react/script/react-compiler.mjs
…8130) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rybook group (#8129) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Closes #
Enable React Compiler for
PortalNote
Depends on / based on the migration foundation PR (base branch
react-compiler-migrate-all-prep). Diff shown here is Portal-only.Portalwas on the React CompilerunsupportedPatternsallowlist because it read/wrote a ref during render (tworeact-hooks/refsdisables) to lazily create its container<div>. This replaces that with the canonicaluseStatelazy-initializer, which obeys the Rules of React, then removesPortalfrom the allowlist so it's compiled.Net −3 lines, no behavior change (the container is still created once and reused; SSR profile is identical since the original also created the element during render).
Validation
eslint src/Portal/Portal.tsxpasses with noreact-hooks/refsdisables.Portaltest suite passes compiled (9/9).Rollout
Merge checklist