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

rehawk

v0.2.6

Published

[![Actions Status](https://github.com/leonardomso/rehawk/workflows/CI/badge.svg)](https://github.com/leonardomso/rehawk/actions) [![LICENSE MIT](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/leonardomso/rehawk) [![npm versi

Readme

Rehawk

Actions Status LICENSE MIT npm version

Work with audio in React it's painful sometimes, that's why this library was created. Especially in React, there are not too many good libraries out there to work with audio.

Rehawk is a powerful and lightweight library that aims to make things easier for you to start to work with audio. Using the Audio API, a custom React Hook powered by an XState finite state machine, it brings a lot of functionalities and methods for you to start faster your development, without having to waste time implementing anything.

Feel free to submit a PR.

Install

yarn add rehawk

Usage

All you need to do is import the RehawkProvider context and the useRehawk hook. Context was the best choice here because sometimes we might want to use different properties of our custom hook in different components in our React tree.

The following is a very basic usage example of Rehawk. If you want the most complete example of Rehawk working, click here.

import React from 'react';
import { RehawkProvider, useRehawk } from 'rehawk';

const src =
  'https://storage.googleapis.com/media-session/elephants-dream/the-wires.mp3';

const Player = () => {
  const {
    ready,
    loading,
    error,
    playing,
    paused,
    stopped,
    onPlay,
    onPause,
  } = useRehawk({
    src,
    autoplay: false,
  });

  return (
    <div>
      <p>Ready: {ready ? 'true' : 'false'}</p>
      <p>Loading: {loading ? 'true' : 'false'}</p>
      <p>Error: {error}</p>
      <p>Playing: {playing ? 'true' : 'false'}</p>
      <p>Paused: {paused ? 'true' : 'false'}</p>
      <p>Stopped: {stopped ? 'true' : 'false'}</p>

      <button onClick={onPlay}>Play</button>
      <button onClick={onPause}>Pause</button>
    </div>
  );
};

const App = () => {
  return (
    <RehawkProvider>
      <Player />
    </RehawkProvider>
  );
};

API

Props

Returned values

Returned methods

Example

To run the example do the following steps:

  1. git clone the repository
  2. cd rehawk/example
  3. yarn install
  4. yarn start

Contributing

Your contributions are welcome! If you have any questions or want to start to contribute to this library in any form, please open an issue. Feel free to open PR.


If there are any questions about this library or about any other topic, please contact me on Twitter @leonardomso and I'll gladly answer it.