Uh oh!
There was an error while loading. Please reload this page.
feat: add React Compiler support for hooks - #8107
Conversation
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 <223556219+Copilot@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 34cb497 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 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Closes N/A
Follow up to #8105.
This PR updates the remaining hooks in the React Compiler unsupported list so they can compile without hook lint suppressions. This work keeps the hook APIs unchanged and moves dependency handling into an internal helper where we need stable cleanup/callback behavior.
As a result,
useAnchoredPosition,useFocusTrap,useFocusZone,useMenuInitialFocus,useOnEscapePress,useResizeObserver, anduseSafeTimeoutare no longer flagged as unsupported for React Compiler.Changelog
New
useDependencieshelper for stable dependency snapshotsChanged
Removed
N/A
Rollout strategy
Selected
patchsince this keeps the public hook APIs unchanged and improves React Compiler support for existing behavior.Testing & Reviewing
npm run format:diffnpm run lintnpm run lint:cssnpm test -- --runnpm run type-checknpm run buildWould love a review on the hook dependency refactors, especially the cleanup paths for focus trap, focus zone, resize observer, and anchored positioning.
Merge checklist