Skip to content
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

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

nucliweb
Copy link
Member

@nucliweb nucliweb commented Nov 7, 2023

Description

Related Issue

Example

@@ -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
Copy link
Contributor

@jordevo jordevo Nov 7, 2023

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

Copy link
Member Author

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

@nucliweb nucliweb merged commit 1d20f4f into master Nov 7, 2023
1 check passed
@nucliweb nucliweb deleted the feat/add-visibilityState-property branch November 7, 2023 09:11
@jordevo
Copy link
Contributor

jordevo commented Nov 7, 2023

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.

@nucliweb
Copy link
Member Author

nucliweb commented Nov 7, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants