-
Notifications
You must be signed in to change notification settings - Fork 149
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
Chrome Lighthouse Audit results - Does not use passive listeners to improve scrolling performance #167
Comments
I'm hoping this can be resolved with a simple PR to update the documentation, which I'm more than happy to do...just need a nudge in the right direction. |
Heyo @lpmi-13 , thanks for setting up the issue. I was able to run lighthouse against https://ipinder.netlify.com/ and see the "7 point hit". I was also able to replicate this on the This is incredibly frustrating that goolge, via lighthouse, have taken such intense measures towards this issue. I remember dealing with this This is something we could tackle a solution for in In the meantime, If you would like to make a PR to add some documention and notes about this issue to the readme please do. NOTES:
|
Add some more details and information in PR #170 |
Effecting dependent packages too: |
if you need fast solution you can reffer to patched swiper version
to
in yours package.json or add it to project using
|
Update/ThoughtsCurrently leaning towards mimicking This has a few benefits that I see:
v6 proposal
v5 current
Cons:
💬 Would love any thoughts/feedback on this approach. |
in common there is only a one possible misuse - actually calling |
@nosovk Great call out. In v4 of react-swipeable/src/Swipeable.js Lines 112 to 116 in 637ef02
We could go that route again. Benefits here:
|
📓 Related to issue #180 |
We have a tentative solution with #210. Ran the lighthouse report and went from 26 -> 27, so it appears lighthouse is not even dinging us as much as it used to when we saw as much as 7 points. |
Hopefully this is fixed with #185 . If anyone stumbles on this with |
Describe the bug
While running a lighthouse audit in Chrome, I'm seeing the "Does not use passive listeners to improve scrolling performance" warning, and it's giving me a 7 point hit on the best practices metric.
I'm assuming there might be some ability to pass this explicitly during the set up of the event handlers, but I was unable to find anywhere in the documentation or source code that pointed me in the right direction.
The component I'm using makes use of the useSwipeable hook rather than the class component, if that matters.
It's also quite possible that I should ignore this aspect of the lighthouse audit.
Steps or Sandbox to reproduce
run lighthouse audit on https://ipinder.netlify.com/
Expected behavior
I'm assuming there's a simple way to force the event handler to use passive:true, but I was unable to find how to do it in the docs. I would like to avoid this warning in the lighthouse audit.
** Device/Browser **
Chrome 79.0.3945.130
react": "^16.12.0"
react-dom": "^16.12.0"
react-router-dom": "^5.1.2"
react-swipeable": "^5.5.0"
The text was updated successfully, but these errors were encountered: