You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it would be awesome if the package would offer a resetINP function or something similar.
Use case
We would need this feature as we take a look at the "subpages" of SPAs as individual pages and would be highly interested in the individual INP values of them. Because of the way the entries are collected in longestInteractionList this of course is not really possible.
Possible Solution
I guess clearing prevInteractionCount, prevInteractionCount, longestInteractionMap in this new reset function should be enough? Or do I miss something here?
Value
This clear function would allow for more different use cases (in combination with the already present reportAllChanges: true) while increasing the complexity and package size only slightly. I think this is a valuable addition!
Thanks!
The text was updated successfully, but these errors were encountered:
Hi @Mattstir , we're not looking to add this functionality to this library at this time for the reasons explained here: #433 (comment)
However, while we appreciate the potential usefulness of this change to allow SPAs to manually measure CLS and INP per route, we do have some concerns with accepting this into the web-vitals library:
First up, the intent of the library (as given in the Overview) is for:
By reseting CLS and INP you will affect the overall "hard-nav" CLS and INP that can be reported.
This is also part of why the soft branch support has not been merged either.
Secondly, the "measuring all the Web Vitals metrics" is a key point. By only making CLS and INP available (which I agree is all that CAN be made available given Chrome itself will not reset LCP or FCP), we think this will lead to confusion, or a certain expectation that they will be available.
But let's leave this issue open so others can comment.
Hi,
it would be awesome if the package would offer a
resetINP
function or something similar.Use case
We would need this feature as we take a look at the "subpages" of SPAs as individual pages and would be highly interested in the individual INP values of them. Because of the way the entries are collected in
longestInteractionList
this of course is not really possible.Possible Solution
I guess clearing
prevInteractionCount, prevInteractionCount, longestInteractionMap
in this new reset function should be enough? Or do I miss something here?Value
This clear function would allow for more different use cases (in combination with the already present
reportAllChanges: true
) while increasing the complexity and package size only slightly. I think this is a valuable addition!Thanks!
The text was updated successfully, but these errors were encountered: