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

qwik-observable-hooks

v0.1.1

Published

Qwik hooks for RxJS Observables. Simple, flexible, testable and performant.

Readme

Qwik Observable Hooks ⚡️

Docs

Made with Qwik Powered by RxJS Built with Bun Linted with Oxc Tested with Vitest Tasks via Justfile Conventional Commits

logo

Qwik hooks for RxJS Observables. Simple, flexible, testable and performant.

  • Seamless integration of Qwik tasks/signals and RxJS streams.
    • Observables → Signals (useObservableValue, useObservableEagerValue).
    • Qwik events → Observables with QRL-powered dispatcher callbacks.
    • Hydration-aware pipeline repair powered by Qwik tasks and useVisibleTask$.
    • Fine-grained subscription hooks (useSubscription) for pure side-effects.
  • Full-powered RxJS. Do whatever you want with Observables. No limitation nor compromise.
  • SSR & resumability safe. Observables are NoSerialize and resubscribe after render commits; state and emitted values stay serializable and resume from server to client.
  • Tiny and fast. No runtime dependencies beyond RxJS and Qwik; marked as sideEffects: false.
  • Fully tested helpers to keep your marble tests happy.
  • Compatible with RxJS 9.0.0-beta.0 and every rendering surface that Qwik supports (SSR, SPA, islands, edge). See docs/rxjs-9.md.

Why?

Qwik added resumability for reusing stateful logic without hydration cost while RxJS offers a powerful way to encapsulate sync/async logic.

Testing Observables with marbles is straightforward. By combining Qwik's signal model with RxJS Observables, we can author reactive components that are lazy by default, streaming server-rendered HTML without pulling large bundles to the client.

With qwik-observable-hooks you can create rich, resumable components with ease.

What It Is Not

This library is not a replacement for state management libraries but a bridge. Use signals, contexts, or stores wherever they make sense, and only bring RxJS to the parts of the tree that truly benefit from reactive streams.

Using this library does not mean every value should become an Observable. Stick to regular Qwik primitives for simple state and reach for these hooks when streams let you model reality better.

At First Glance

import { component$, $ } from "@qwik.dev/core";
import { timer } from "rxjs";
import { switchMap, mapTo, startWith } from "rxjs/operators";
import { useObservableValue } from "qwik-observable-hooks";

const App = component$(() => {
	const [isTyping, updateIsTyping] = useObservableValue(
		$((event$) =>
			event$.pipe(
				switchMap(() => timer(1000).pipe(mapTo(false), startWith(true))),
			),
		),
		false,
	);

	return (
		<div>
			<input type="text" onKeyDown$={(event) => updateIsTyping(event)} />
			<p>{isTyping.value ? "Good you are typing." : "Why stop typing?"}</p>
			<button onClick$={(event) => updateIsTyping(event)}>Mock Key</button>
		</div>
	);
});

Logic stays pure and can be tested like an Epic in redux-observable. Every callback is a QRL, so the whole thing remains lazy-load friendly.

Installation

bun

bun add qwik-observable-hooks rxjs

npm

npm install qwik-observable-hooks rxjs

pnpm

pnpm add qwik-observable-hooks rxjs

yarn

yarn add qwik-observable-hooks rxjs

Usage

Read the docs at https://qwik-observable-hooks.js.org (our VitePress instance lives there).

Here is how the API is structured which might help you decide which hook to reach for:

mindmap

Examples live in the root /docs site (npm run docs:dev). Share more recipes with us!

Note that there are also some useful helpers for common use cases to reduce garbage collection and boilerplate.