![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
use-stay-awake-nextjs
Advanced tools
React hook that will help the device stay awake while actively using your website or app.
React hook that make device stay awake while actively using your website.
Using PNPM
pnpm add use-stay-awake-nextjs
Using Yarn
yarn add use-stay-awake-nextjs
Using NPM
npm install use-stay-awake-nextjs
import React from "react";
import useStayAwake from "use-stay-awake";
function App() {
const device = useStayAwake();
return (
<div>
<p>
Status:
<span>
{device.canSleep
? "Device is allowed to sleep"
: "Device is not allowed to sleep"}
</span>
</p>
<button
onClick={() => {
device.preventSleeping();
}}
>
Prevent Sleeping
</button>
<button
onClick={() => {
device.allowSleeping();
}}
>
Allow Sleeping
</button>
</div>
);
}
export default App;
Prop Name | Type | Description |
---|---|---|
canSleep | boolean default: true | Indicator if the device allowed to sleep. |
preventSleeping | function | Function that prevent the device from sleeping. |
allowSleeping | function | Function that allow the device from sleeping. |
v9-11
v12-84
v22-81
v4-87
v4-14-TP
v16-69
v3.2-14.0
v4.4-81
v12-46
v84
v68
v12.12
v4-12.0
v10.4
v7.12
v2.5
Thank you so much for contributing! :blue_heart:
Clone the repository
git clone https://github.com/roldanjr/use-stay-awake
Locate library folder
cd use-stay-awake
Install library dependencies
yarn install or npm install
Locate demo folder and install dependencies
cd demo
yarn install or npm install
Start development server under root folder
yarn develop or npm run develop
MIT © Roldan Montilla Jr
FAQs
React hook that will help the device stay awake while actively using your website or app.
The npm package use-stay-awake-nextjs receives a total of 0 weekly downloads. As such, use-stay-awake-nextjs popularity was classified as not popular.
We found that use-stay-awake-nextjs 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.