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

@hoqn/zusammen

v0.1.0

Published

A simple state management for react

Readme

@hoqn/zusammen

[!IMPORTANT] 이 라이브러리는, 주로 학습을 목적으로 직접 구현해 본 라이브러리예요. 실제 프로젝트나 서비스에는 절대! 사용하지 마세요.
대신 Zustand를 사용하실 수 있어요.

이 코드는, React를 흉내낸 라이브러리를 작성하고 이를 기반으로 간단한 앱을 만드는 과정에서, 전역 상태 관리가 필요해 만들게 된 코드예요. 앞선 라이브러리가 React와 거의 같은 인터페이스를 구현하고 있었기 때문에, 상태 관리 부분을 실제 React에서도 동작하도록 변경했어요.

특징

  • Zustand와 비슷하게 사용할 수 있어요.
const useStore = createStore((set, get) => ({
  // ...
}));

// 사용처
const counter = useStore((s) => s.counter);
  • 기본적으로 React 18의 useSyncExternalStore를 사용해요.
    다만, 내부적으로 주석 처리되어 있는 부분을 해제하고 빌드하면 React 18 이전에서도 사용할 수 있도록 구현되어 있어요.

function useStore(...) {
  // React 18 이전
  // ...

  // React 18 이후
  ...
}
  • TypeScript를 완전히 지원해요. 상태와 Selector를 포함한 모든 곳에서 타이핑을 지원해요.

사용법

[!NOTE] React에서 사용하려면, 모든 모듈은 @hoqn/zusammen/react에서 가져와야 해요.

// store.ts
import { createStore } from "@hoqn/zusammen/react";

type TigerStore = TigerStoreActions & TigerStoreState;

const useTigerStore = createStore<TigerStore>((set, get) => ({
  counter: 0,
  incrementCounter: () => {
    const current = get().counter;
    set({ counter: current + 1 });
  },
}));

// Component.tsx
function MyComponent() {
  const { counter, incrementCounter } = useTigerStore();
  // const counter = useTigerStore(s => s.counter);
  // const incrementCounter = useTigerStore(s => s.incrementCounter);

  return (
    <div>
      <div>{counter}</div>
      <button onClick={() => void incrementCounter()}>increment</button>
    </div>
  );
}

해결되지 않은 문제

  • Redux Devtool을 지원하지 않아요.

  • 얕은 비교를 지원하지 않아요. Selector 작성 시 단일 셀렉터 위주로 작성해야 불필요한 리렌더링을 최소화할 수 있어요.

  • 아직 Raw 관점의 관리를 지원하지 않아요.