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

simple-redux

v0.2.0

Published

simple-redux, a new way to use redux simplier.

Readme

(Not done yet, To Continue)

前言

simple-redux 并不是简化版的 redux, 简称 sr, 而是基于redux + immutable.js 的一种二次标准化构建,相比于原生redux, 要达到的目标有

  • 使用抽象的匿名空间来缩短事件传递长度复杂度,匿名空具体实现为为控制实例 partStore
  • 提供一种标准的跨组件通讯机制
  • 使用typescript相关特性来使数据的读写明确化
  • 对渐进式开发做足够的支持

特点

  • 把 主store 挂载到 全局名空间下,即 window 对象下,以实现可以生成每个容器的 partStore 来大大简化数据的读写。
  • 放弃原始 redux 在 React 组件里绑定 dispatcher 的方法,每个函数只需直接的调用对应action包的函数,action包的函数可以方便的处理异步过程,并利用 partStore 的方法来进行完备的数据更新任务。
  • 在视图开发时,可以利用 modelState 来明确地读取数据模型;action开发时,可以 partStore 对数据做更新。
  • 定义了相对完善的组件规范,提供基础的与标准配套的命令行工具
  • 改原生redux 类似“并行线”的很多类型的 action.type 为类似串行线的只有几个标准类型的 action.type,极大地级高了开发效率

组件层次划分:

一个完整的容器组件由以下三个部分组成:

  • 1、数据模型模块: component.model.js
  • 2、视图模块: component.view.jsx + component.style.*ss
  • 3、动作模块: component.action.js

各层的的功能职责介绍已分为3个文件描述,请分别查看。在介绍这些组件分层是,可能会涉及与原生redux的比较,如果读者对原始redux不够理解,可以跳过这些内容。我会在确认框架开源后推出入门者 get started 文档和完整的项目案例。