npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@marcocrupi/react-native-keep-awake-plus

v1.6.0

Published

Maintained fork of @sayem314/react-native-keep-awake. Keep the screen from going to sleep in React Native apps.

Readme

React Native Keep Awake Plus

@marcocrupi/react-native-keep-awake-plus is a React Native library for preventing the screen from going to sleep while your app is active.

It is an independently maintained fork by Marco Crupi, based on the original work by Kyle Corbitt and Sayem Chowdhury.

Project status

This fork is being modernized and build-validated with the included React Native 0.85.3 smoke app.

The repository does not yet publish a full compatibility matrix. No registry or repository release state is claimed here.

About this fork

@marcocrupi/react-native-keep-awake-plus is an independently maintained fork of @sayem314/react-native-keep-awake.

The original project was created by Kyle Corbitt and later maintained by Sayem Chowdhury. This fork is maintained by Marco Crupi.

The goal of this fork is to keep the package usable for current React Native projects while preserving the original public API where possible. The original MIT license and copyright notices are preserved.

This fork is not affiliated with or endorsed by the original maintainers unless they state otherwise.

Installation

Install the package with npm:

npm install @marcocrupi/react-native-keep-awake-plus

Or with Yarn:

yarn add @marcocrupi/react-native-keep-awake-plus

Usage

Hook

import { useKeepAwake } from '@marcocrupi/react-native-keep-awake-plus';
import React from 'react';
import { Text, View } from 'react-native';

export default function KeepAwakeExample() {
  useKeepAwake();

  return (
    <View>
      <Text>This screen will stay awake while this component is mounted.</Text>
    </View>
  );
}

Component

import KeepAwake from '@marcocrupi/react-native-keep-awake-plus';
import React from 'react';
import { Text, View } from 'react-native';

export default function KeepAwakeExample() {
  return (
    <View>
      <KeepAwake />
      <Text>This screen will stay awake while KeepAwake is mounted.</Text>
    </View>
  );
}

Imperative functions

import {
  activateKeepAwake,
  deactivateKeepAwake,
} from '@marcocrupi/react-native-keep-awake-plus';
import React from 'react';
import { Button, View } from 'react-native';

export default function KeepAwakeExample() {
  return (
    <View>
      <Button title="Activate" onPress={activateKeepAwake} />
      <Button title="Deactivate" onPress={deactivateKeepAwake} />
    </View>
  );
}

Multi-owner behavior

The component and hook are owner-counted. If multiple React owners are mounted at the same time, keep-awake remains active until the last owner is unmounted.

This behavior applies to <KeepAwake /> and useKeepAwake(). The native deactivate call is made only after the final React owner is removed.

Imperative behavior

activateKeepAwake() and deactivateKeepAwake() are direct calls to the native module and intentionally keep last-call-wins behavior.

The imperative functions do not participate in the owner counting used by the component and hook.

React Native 0.85.3 smoke app

The repository includes a smoke app in example/ targeting React Native 0.85.3. It uses npm, depends on this package through @marcocrupi/react-native-keep-awake-plus: "file:..", and enables install-links=true in example/.npmrc.

The install-links=true setting avoids installing the local file:.. dependency as a symlink. This matters because React Native Codegen may not process the package root correctly when the local dependency is symlinked.

Common example commands:

cd example
npm install
npm test
npm run android
npm run ios

Compatibility

Minimum supported React Native: 0.73.

Development target: React Native 0.85.3.

Tested with React Native 0.85.3 using the New Architecture through the included smoke app on Android and iOS. Legacy bridge files are kept for compatibility with the supported React Native range.

React Native 0.85.3 old architecture is not claimed as validated. React Native 0.85.x no longer supports disabling the New Architecture in the same way as older React Native versions.

The package has been validated with a React Native 0.73.11 temporary fixture installed from the local npm tarball. That validation covered Android old architecture build and runtime smoke, Android New Architecture Codegen/build, iOS pod install/build, lint, root API smoke, and the legacy Class deep import smoke.

The included example/ app targets React Native 0.85.3 and is used as the main development smoke app.

React Native versions beyond 0.85.x are not claimed as supported until verified.

The repository does not yet publish a full compatibility matrix for every patch release or intermediate React Native range.

Non-native environments use a no-op fallback. This should not be presented as full browser keep-awake support.

Development notes

Use example/ for local development and smoke checks. After changing files in the package root, run cd example && npm install when you need to refresh the example app's installed local copy.

Jest owner-counting tests live in example/__tests__. The manual multi-owner smoke UI lives in example/App.tsx.

License

This project is available under the MIT license.

Credits

Original project:

  • Kyle Corbitt
  • Sayem Chowdhury

Fork maintainer:

  • Marco Crupi