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

bizify

v1.0.2

Published

Lightweight React MVVM framework backed by zustand

Readme

Bizify

轻量的 React MVVM 框架。把业务逻辑写在 ViewModel 里,视图只负责渲染。基于 valtio 实现,自动追踪 + 直接 mutate。

npm license

安装

pnpm add bizify

快速开始

// counter-vm.ts
import { ViewModelBase } from 'bizify';

export class CounterVM extends ViewModelBase<{ count: number }> {
  protected $data() {
    return { count: 0 };
  }

  plus() {
    this.data.count += 1;
  }
  minus() {
    this.data.count -= 1;
  }
}
// Counter.tsx
import { useViewModel } from 'bizify';
import { CounterVM } from './counter-vm';

export function Counter() {
  const vm = useViewModel(CounterVM);
  const snap = vm.useSnapshot();

  return (
    <div>
      <button onClick={vm.minus}>-</button>
      <span>{snap.count}</span>
      <button onClick={vm.plus}>+</button>
    </div>
  );
}

核心特性

  • MVVM 架构 — VM 持有状态与行为,View 只关心渲染
  • 直接 mutate — 基于 valtio,this.data.x = y 自动响应,深度嵌套也行
  • 自动追踪订阅vm.useSnapshot() 读什么订什么,无需 selector / shallow
  • 计算属性 — 在 $data 里写 getter,自动追踪依赖
  • 生命周期onInit / onMount / onUnmount,StrictMode 隐形(单触发,Vue 风格)
  • SSR 友好 — Provider 模式,跨请求隔离,初始数据可注入
  • 类风格 OOP — 业务逻辑可独立单测,无需 mock React

API 概览

import {
  ViewModelBase,            // 基类
  useViewModel,             // 组件局部 VM
  createViewModelContext,   // Provider + 共享 / SSR
} from 'bizify';

// 框架无关核心
import { ViewModelBase } from 'bizify/core';

文档

完整文档:https://hstarorg.github.io/bizify/

开发

pnpm install        # 装依赖
pnpm test           # 跑测试
pnpm build          # 构建库
pnpm docs:dev       # 文档站本地预览
pnpm docs:build     # 构建文档站
pnpm lint           # oxlint

License

MIT © hstarorg