Codeowners should investigate react-compiler eslint violations as these prevent React Compiler from, potentially, optimizing Fluent UI. Each violation means we're breaking at least one of the Rules of React.
Currently all violations are excepted via 'use no memo', React Compiler's directive to opt out of optimization, as the first phase of this work is simply to enable the compiler. Ideally we'd have no violations but this code has been working to date so it's probably fine, but now that we have tooling to call out issues we should re-evaluate our implementations.
Disabling exhaustive deps lint rule in hooks
[ ] useComboboxBaseState.ts
[ ] useDatePicker.tsx
[ ] useMotion.ts
[ ] createPresenceComponent.ts
[ ] usePositioning.ts
[ ] useFluentProvider.ts
[ ] useMergeTabsterAttributes.ts
[ ] useHeadlessFlatTree.ts
[ ] useMergedRefs.ts
[ ] useVirtualizer.ts
[ ] useVirtualizerScrollViewDynamic.ts
[ ] useDynamicPagination.ts
[ ] useResizeObserverRef.ts
[ ] useStaticPagination.ts
[ ] useWeeks.ts
Mutating params to a hook
[ ] useCharacterSearch.ts
[ ] usePopover.ts
[ ] useSliderState.tsx
Modifying state returned by a hook
[ ] useMenuButton.tsx
[ ] useCheckbox.tsx
[ ] useInputTriggerSlot.ts
[ ] useButtonTriggerSlot.ts
[ ] CheckboxShim.tsx
[ ] createPreset.ts
[ ] useTooltip.tsx
[ ] useFlatTreeNavigation.ts
[ ] useTreeNavigation.ts
Mutating a variable that React considers immutable
[ ] useMenuPopover.ts
Conditionally calling hooks
[ ] createMotionComponent.ts
[ ] PortalCompatProvider.tsx
[ ] usePortalMountNode.ts
[ ] usePositioning.ts
[ ] useFluentProviderThemeStyleTag.ts
[ ] useCarousel.ts
[ ] useFlatTree.ts
[ ] useTree.ts
[ ] useTreeContextValues.ts
[ ] useControllableState.ts
[ ] useId.ts
[ ] useSelection.ts
[ ] Carousel.tsx
[ ] useCombobox.tsx
[ ] useDropdown.tsx
Calling hooks from something that is not a functional component
[ ] useTableColumnSizing.tsx
[ ] useTableSelection.ts
[ ] useTableSort.ts
Hook might be a different function on different renders
[ ] useToaster.tsx
Have you discussed this feature with our team
@khmakoto
Additional context
See #31457
Validations
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
Codeowners should investigate
react-compiler
eslint violations as these prevent React Compiler from, potentially, optimizing Fluent UI. Each violation means we're breaking at least one of the Rules of React.Currently all violations are excepted via
'use no memo'
, React Compiler's directive to opt out of optimization, as the first phase of this work is simply to enable the compiler. Ideally we'd have no violations but this code has been working to date so it's probably fine, but now that we have tooling to call out issues we should re-evaluate our implementations.Disabling exhaustive deps lint rule in hooks
useComboboxBaseState.ts
useDatePicker.tsx
useMotion.ts
createPresenceComponent.ts
usePositioning.ts
useFluentProvider.ts
useMergeTabsterAttributes.ts
useHeadlessFlatTree.ts
useMergedRefs.ts
useVirtualizer.ts
useVirtualizerScrollViewDynamic.ts
useDynamicPagination.ts
useResizeObserverRef.ts
useStaticPagination.ts
useWeeks.ts
Mutating params to a hook
useCharacterSearch.ts
usePopover.ts
useSliderState.tsx
Modifying state returned by a hook
useMenuButton.tsx
useCheckbox.tsx
useInputTriggerSlot.ts
useButtonTriggerSlot.ts
CheckboxShim.tsx
createPreset.ts
useTooltip.tsx
useFlatTreeNavigation.ts
useTreeNavigation.ts
Mutating a variable that React considers immutable
useMenuPopover.ts
Conditionally calling hooks
createMotionComponent.ts
PortalCompatProvider.tsx
usePortalMountNode.ts
usePositioning.ts
useFluentProviderThemeStyleTag.ts
useCarousel.ts
useFlatTree.ts
useTree.ts
useTreeContextValues.ts
useControllableState.ts
useId.ts
useSelection.ts
Carousel.tsx
useCombobox.tsx
useDropdown.tsx
Calling hooks from something that is not a functional component
useTableColumnSizing.tsx
useTableSelection.ts
useTableSort.ts
Hook might be a different function on different renders
useToaster.tsx
Have you discussed this feature with our team
@khmakoto
Additional context
See #31457
Validations
Priority
Normal