Skip to content

React Compiler: enable remaining overlay, list and focus files #8721

Open

Description

@mattcosta7

Part of #8676 (P1). Depends on #8563, #8566, #8567 and #8565.

Problem

After the open React Compiler PRs land, these hot files are still listed in packages/react/script/react-compiler.mjs unsupportedPatterns:

  • src/FilteredActionList/FilteredActionList.tsx
  • src/SelectPanel/SelectPanel.tsx
  • src/TreeView/TreeView.tsx
  • src/AnchoredOverlay/AnchoredOverlay.tsx
  • src/hooks/useAnchoredPosition.ts
  • src/hooks/useFocusTrap.ts
  • src/hooks/useFocusZone.ts
  • src/hooks/useResizeObserver.ts

The build targets React 18 with a bundled useMemo fallback (rolldown.config.ts, utils/react-compiler-runtime.ts), so enabling the compiler is safe on both React 18 and 19.

Proposed approach

Enable the compiler one file or a small group at a time, following the pattern in #8563. Refactor only the patterns that block compilation. Coordinate with #8713 (useAnchoredPosition) and #8717 (SelectPanel) and #8718 (TreeView) so the PRs don't conflict.

Acceptance criteria

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions