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

@stream-mdx/react

v0.5.0

Published

React renderer, scheduler, and worker wiring for the Streaming Markdown V2 pipeline

Readme

@stream-mdx/react

@stream-mdx/react is the renderer package for StreamMDX. It owns the React component surface, the renderer store, patch scheduling, server rendering helpers, and the packaged bottom-stick scroll component used by the docs/demo surfaces.

Most apps should install stream-mdx instead. Use this package directly when you want the React layer without the convenience wrapper.

Install

npm install @stream-mdx/react @stream-mdx/worker

Peer dependencies:

| Package | Range | | --- | --- | | react | >=18.2.0 | | react-dom | >=18.2.0 |

Primary Exports

| Export | Purpose | | --- | --- | | @stream-mdx/react | Main React surface including <StreamingMarkdown /> | | @stream-mdx/react/server | Server/static render helpers | | @stream-mdx/react/components | Shared UI component exports | | @stream-mdx/react/components/bottom-stick-scroll-area | Packaged sticky-bottom scroll container | | @stream-mdx/react/renderer | Lower-level renderer exports | | @stream-mdx/react/renderer/patch-commit-scheduler | Scheduler implementation surface | | @stream-mdx/react/renderer/store | Renderer store surface | | @stream-mdx/react/mdx-client | MDX client helpers | | @stream-mdx/react/mdx-coordinator | MDX coordination helpers |

Quickstart

mkdir -p public/workers
cp node_modules/@stream-mdx/worker/dist/hosted/markdown-worker.js public/workers/markdown-worker.js
"use client";

import { StreamingMarkdown } from "@stream-mdx/react";

export function Demo({ text }: { text: string }) {
  return (
    <StreamingMarkdown
      text={text}
      worker="/workers/markdown-worker.js"
      features={{ html: true, tables: true, math: true, mdx: true, footnotes: true }}
      mdxCompileMode="worker"
    />
  );
}

Typical Uses

| Use case | API | | --- | --- | | Browser/client rendering | <StreamingMarkdown /> | | SSR / SSG / static export rendering | MarkdownBlocksRenderer from @stream-mdx/react/server | | Rich streaming/chat container | BottomStickScrollArea | | Advanced renderer internals | renderer/store, renderer/patch-commit-scheduler |

Server-side block rendering

import { ComponentRegistry, MarkdownBlocksRenderer } from "@stream-mdx/react/server";

return <MarkdownBlocksRenderer blocks={blocks} componentRegistry={new ComponentRegistry()} />;

Bottom-stick scroll area

import { BottomStickScrollArea } from "@stream-mdx/react/components/bottom-stick-scroll-area";

<BottomStickScrollArea className="h-[32rem]">{children}</BottomStickScrollArea>;

Behavior notes:

  • sticks to bottom while content appends
  • detaches on upward user scroll
  • supports smooth return-to-bottom behavior
  • exposes debug hooks used by deterministic checks in the repo

When To Use This Package Directly

  • You are shipping a library that wants @stream-mdx/react explicitly in peerDependencies or dependencies.
  • You need server rendering helpers without the convenience wrapper import path.
  • You are working on renderer internals and want the lower-level exports directly.

Documentation