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

@rscc/common-react

v0.2.0

Published

RSCC 공통 React 훅 — useDebounce, useSse (@rscc/common-core 의 SSE 파서 래핑).

Readme

@rscc/common-react

RSCC 공통 React 훅 — useDebounce, useSse. @rscc/common-core 의 SSE 파서(readSseStream)를 React 상태로 래핑한다.

설치

npm i @rscc/common-react
  • peerDependencies: react >= 18 — 소비 앱이 직접 설치
  • @rscc/common-core^ 범위 의존으로 함께 설치된다 (두 패키지는 락스텝 버전)
  • Node >= 18, ESM + CJS 듀얼 빌드, 타입 선언 동봉

| 훅 | 시그니처 | 설명 | |---|---|---| | useDebounce | useDebounce<T>(value, delayMs = 200): T | 마지막 안정 값만 통과 — 자동완성 API 호출 절감 | | useSse | useSse(options?){ start, cancel, text, sources, conversationId, error, isStreaming } | SSE 구독 상태 훅 — 언마운트 시 자동 중단 |

사용 예시

useDebounce

import { useDebounce } from "@rscc/common-react";

const debounced = useDebounce(keyword, 200);
// debounced 가 바뀔 때만 자동완성 API 호출

useSse

import { useSse } from "@rscc/common-react";

const { start, cancel, text, sources, conversationId, error, isStreaming } = useSse();

await start("/api/v1/chat/stream", { method: "POST", headers, body });
// text: delta 누적 텍스트, sources: RAG 근거, error: in-band 오류 메시지
// cancel(): 중단 — 그때까지의 text 는 보존되고 error 는 남지 않는다
  • 구독 전 검증 실패(!res.ok)는 응답 봉투의 messageerror 로 노출한다.
  • start 재호출 시 이전 스트림을 중단하고 상태를 초기화한다.
  • 한계: [DONE] 정상 종료와 끊긴 스트림을 구분하는 신호가 없다 — 둘 다 isStreaming=false, error=null 로 끝난다.

문서 / 저장소