react-use icon indicating copy to clipboard operation
react-use copied to clipboard

feat(wakelock): adds useWakeLock hook

Open iamsuneeth opened this issue 3 years ago • 2 comments

Description

Screen wakelock is a feature which is part of the capabilities being developed as part of project fugu . It lets a website prevents the device screen from going dark once the lock is acquired. The lock is controlled by some external factors as well

  • Battery percentage left on the device
  • visibility of the browser tab
  • power saver mode on the device.

support : https://caniuse.com/wake-lock

case study

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as before)

Checklist

  • [x] Read the Contributing Guide
  • [ ] Perform a code self-review
  • [ ] Comment the code, particularly in hard-to-understand areas
  • [x] Add documentation
  • [x] Add hook's story at Storybook
  • [ ] Cover changes with tests
  • [ ] Ensure the test suite passes (yarn test)
  • [ ] Provide 100% tests coverage
  • [x] Make sure code lints (yarn lint). Fix it with yarn lint:fix in case of failure.
  • [x] Make sure types are fine (yarn lint:types).

iamsuneeth avatar May 31 '21 08:05 iamsuneeth

Awaiting review from maintainers. If this feature is worthwhile to add , will add necessary tests to complete the PR

iamsuneeth avatar Jun 01 '21 07:06 iamsuneeth

Thank you for making this PR. I just used the code to implement a wake-lock feature. What is up with this not being merged for two years?

VulcanTech-io avatar Oct 03 '23 18:10 VulcanTech-io