Skip to content

Use useTimeout() and useAnimationFrame() rather than globals. #30968

@spmonahan

Description

@spmonahan

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

Have you discussed this feature with our team

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Priority

Normal

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions