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

react-native-tinykit

v0.4.2

Published

A lightweight React Native toolkit for iOS, providing essential native utilities (Zero dependencies)

Downloads

15

Readme

react-native-tinykit

npm version license

A lightweight React Native toolkit for iOS, providing essential native utilities (Zero dependencies).

Features

  • 🔄 App Restart - Programmatically restart your React Native application
  • 🌡️ Thermal State - Get and monitor the device's thermal state
  • App Review - Request App Store review from within your app
  • Turbo Module - Built with the new architecture for optimal performance
  • 📦 Lightweight - Minimal footprint with zero dependencies

Requirements

  • React Native >= 0.76
  • iOS only (for now)

Installation

# Using npm
npm install react-native-tinykit

# Using yarn
yarn add react-native-tinykit

iOS Setup

cd ios && pod install

Usage

Restart Application

Restart the React Native application programmatically:

import { restart } from 'react-native-tinykit';

// Restart the app
restart();

Example Use Cases

  • Force reload after language/locale change
  • Reset app state after logout
  • Apply configuration changes that require a restart

Thermal State

Get the current thermal state and monitor for changes:

import { getThermalState, onThermalStateChange } from 'react-native-tinykit';

// Get current thermal state
const state = getThermalState();
console.log('Current thermal state:', state);

// Listen for thermal state changes
const subscription = onThermalStateChange((state) => {
  console.log('Thermal state changed:', state);

  switch (state) {
    case 'nominal':
      // Normal operating conditions
      break;
    case 'fair':
      // Slightly elevated thermal state
      break;
    case 'serious':
      // High thermal state - consider reducing activity
      break;
    case 'critical':
      // Critical thermal state - reduce activity immediately
      break;
  }
});

// Clean up the listener when done
subscription.remove();

Example Use Cases

  • Reduce graphics quality or frame rate when device is overheating
  • Pause background tasks during high thermal states
  • Show warnings to users when thermal state is critical

App Review

Request an App Store review from your user:

import { requestReview } from 'react-native-tinykit';

// Request review
await requestReview();

Note: In development mode, the review dialog will always appear. In production (TestFlight/App Store), iOS limits the frequency of these prompts (max 3 times per year per user).

Example Use Cases

  • Prompt for review after a user completes a significant action
  • Ask for feedback after a certain number of app opens

API Reference

restart()

Triggers a reload of the React Native application.

restart(): void

Example:

import { restart } from 'react-native-tinykit';

const handleLogout = async () => {
  await clearUserData();
  restart(); // Restart app to reset state
};

getThermalState()

Returns the current thermal state of the device.

getThermalState(): ThermalState

Returns: 'nominal' | 'fair' | 'serious' | 'critical'

| State | Description | | ---------- | ----------------------------------------- | | nominal | The thermal state is within normal limits | | fair | The thermal state is slightly elevated | | serious | The thermal state is high | | critical | The thermal state is critically high |

Example:

import { getThermalState } from 'react-native-tinykit';

const state = getThermalState();
if (state === 'critical') {
  // Reduce app activity to help cool down the device
}

onThermalStateChange()

Adds a listener for thermal state changes.

onThermalStateChange(listener: (state: ThermalState) => void): { remove: () => void }

Parameters:

  • listener - Callback function that receives the new thermal state

Returns: A subscription object with a remove() method to stop listening

Example:

import { onThermalStateChange } from 'react-native-tinykit';

const subscription = onThermalStateChange((state) => {
  console.log('Thermal state changed to:', state);
});

// Later, when you want to stop listening:
subscription.remove();

requestReview()

Requests a review of the app.

requestReview(): Promise<void>

Returns: A Promise that resolves when the request is processed.

Example:

import { requestReview } from 'react-native-tinykit';

const handleReview = async () => {
  try {
    await requestReview();
  } catch (error) {
    console.error('Failed to request review:', error);
  }
};

Apps Using This Library

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT © Darkce


Made with create-react-native-library