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

@elah/react

v0.6.0

Published

React bindings for the Elah video engine — editor context, store hooks, and audio mixer hooks

Readme

@elah/react

React bindings for the Elah video engine.

@elah/core is framework-agnostic — it has zero React imports and runs in Node, workers, and non-React apps (Vue, Svelte, plain JS). This package is the React layer on top of it:

  • Editor context — EditorContext, useEditor, useTimelineEngine, usePlaybackEngine
  • Store hooks — useTracksStore, usePlaybackStore, useSelectionStore, useTransitionsStore, useTextStylePresetsStore, useClipLoadStore, useMediaLibraryStore, useMediaLibrary (alias useAssets) — React views over core's vanilla Zustand stores
  • Audio hooks — useAudioMixer, useMasterVolume, useTrackLevels

useTextStylePresetsStore reads the reusable text looks; useClipLoadStore(s => s.byClipId[clipId]) reports 'loading' or 'error' for a clip the preview cannot draw yet.

Each store hook also carries the vanilla store API, so useTracksStore(s => s.tracks) and useTracksStore.getState() both work.

@elah/core ships the stores as module-level singletons (one tracksStore, one playbackStore, etc. per JS realm), and this package's hooks bind to those exact instances — so only one active engine/project per page is supported today. @elah/editor's <EditorProvider> wires a TimelineEngine + PlaybackEngine into these shared stores on mount; mounting a second <EditorProvider> (or manually wiring a second engine into EditorContext.Provider) on the same page will have both write into the same stores and clobber each other's state.

Version note: install @elah/react at the same release line as whatever @elah/core (and, if used, @elah/timeline/@elah/editor) version you're on — see each package's peerDependencies/dependencies range. A mismatched @elah/core copy (e.g. hoisted to a different version than what @elah/react/@elah/timeline/@elah/editor resolve internally) means two separate copies of these singleton stores exist, and state silently stops syncing between them.

Install

npm install @elah/react @elah/core react

Peer dependency: react >= 18.

Most apps should install @elah/editor instead — the batteries-included SDK that re-exports everything here alongside the timeline UI and <EditorProvider>.

Usage

import { useTimelineEngine, useTracksStore } from '@elah/react'

function TrackCount() {
  const engine = useTimelineEngine()
  const tracks = useTracksStore((s) => s.tracks)
  return <span>{tracks.length} tracks in {engine.getProject().id}</span>
}

License

Apache-2.0