-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(packages/sui-react-web-vitals): add visibilityState property #1656
Conversation
@@ -113,7 +113,8 @@ export default function WebVitalsReporter({ | |||
path: hasPathOnRoute ? pathname : getNormalizedPathname(pathname), | |||
target, | |||
loadState: attribution.loadState, | |||
...(attribution.eventType && {eventType: attribution.eventType}) | |||
...(attribution.eventType && {eventType: attribution.eventType}), | |||
visibilityState: document.visibilityState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming document
will be available because we're inside a useMount
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we have access to document inside a useMount
I reckon it'd be great to add some documentation on the package's readme so that's easy to know the new stuff that's available. |
I agree; first, we want to test if this info will be useful. We are looking for quick wins to improve the INP metric. #1657 created |
Description
Related Issue
Example