@sayem314/react-native-keep-awake
Version:
Keep the screen from going to sleep. iOS, Android and Web.
24 lines (19 loc) • 514 B
TypeScript
import {FunctionComponent} from 'react';
/**
* Prevent the screen from sleeping.
*/
export function activateKeepAwake(): void;
/**
* Releases screen-sleep prevention.
*/
export function deactivateKeepAwake(): void;
/**
* React hook to keep the screen awake for as long as the owner component
* is mounted.
*/
export function useKeepAwake(): void;
/**
* React component to keep the screen awake while this component is rendered.
*/
declare const KeepAwake: FunctionComponent;
export default KeepAwake;