-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
Description
Package
react
Package version
8.125.4
React version
N/A
Environment
N/ACurrent Behavior
makeStyles uses the deprecated window event "unload"
Expected Behavior
Per MDN documentation, the code should instead use either the visibilitychange or pagehide events.
Given that this code looks related to cache cleanup, I'm unclear of the implications if a window were re-used after the above events fired. I'm also not sure of the scale of cache size and whether either the cache or cleanup are needed.
I'm happy to make any change under the advice of code owners.
Reproduction
N/A
Steps to reproduce
Call makeStyles
Are you reporting an Accessibility issue?
None
Suggested severity
Low - Has or doesn't need a workaround
Products/sites affected
Outlook - our reporting endpoint has a significant number of deprecation reports for this issue, drowning out other deprecation reports.
Are you willing to submit a PR to fix?
yes
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable