
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-use-wake-lock
Advanced tools
Easily integrate Screen Wake Lock API in your app
npm install react-use-wake-lock --save
or
yarn add react-use-wake-lock
import useWakeLock from "react-use-wake-lock";
function MinimalExampleComponent() {
const { isSupported, isLocked, request, release } = useWakeLock();
return (
<div>
<h3>Screen Wake Lock API supported: {isSupported ? "Yes" : "No"}</h3>
<h3>Locked: {`${isLocked ? "Yes" : "No"}`}</h3>
<button type="button" onClick={() => (isLocked ? release() : request())}>
{isLocked ? "Release" : "Request"}
</button>
</div>
);
}
onError(error: Error, errorType: "request" | "release") - callback called in case of any error during acuqiring lock or releasing itonLock(lock: WakeLockSentinel) - callback for successful acquiring of a lockonRelease(lock: WakeLockSentinel) - callback called on releasing the lockisSupported: boolean - is Screen Wake Lock API supported by a browserisLocked: boolean - current state of a lockrequest: () => void - request a lockrelease: () => void - release the lockFAQs
React hooks to make it easier to use Screen Wake Lock API
The npm package react-use-wake-lock receives a total of 288 weekly downloads. As such, react-use-wake-lock popularity was classified as not popular.
We found that react-use-wake-lock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.