fluentui
fluentui copied to clipboard
Use `useTimeout()` and `useAnimationFrame()` rather than globals.
Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
@fluentui/react-utilities provides useTimeout() and useAnimationFrame() for working with timers and animation frames respectively. In several places in Fluent UI v9 window.setTimeout and window.requestAnimationFrame are used instead of these hooks.
We should probably update these instances to use the hooks but codeowners are in the best position to decide.
See #30967
Relevant packages
- [x] react-menu
- [x] useMenu
- [x] useMenuPopover
- [x] react-popover
- [x] usePopover
- [x] react-table
- [x] react-toast
- [x] useAriaLive
- [x] react-virtualizer
- [x] useVirtualizer
- [x] useDynamicPagination
- [x] useIntersectionObserver
- [x] useStaticPagination
Have you discussed this feature with our team
No response
Additional context
No response
Validations
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Priority
Normal
Leaving this one untriaged to talk about at Tech Sync.