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

redux-re-do

v1.0.3

Published

A strongly typed alternative to redux-thunk

Readme

redux-re-do

A strongly typed alternative to redux-thunk

Why does it exist?

Thunk is great. It's incredibly simple and incredibly useful. However, the one flaw I always found was that technically a ThunkAction isn't really an action at all...

Redux defines an Action as an object with a type property, a ThunkAction however is actually just a function. If you're being strict this really means you probably shouldn't be dispatching a Thunk. What's more, the Thunk middleware assumes that any function that is passed into dispatch must be a ThunkAction. While generally true, this still leaves plenty of room for error.

The purpose of this library is to take the same functionality provided by Thunk, but do it in a way that better matches the expected typing of Redux and also provide a safer environment for other middlewares to exist along side of it.

Usage

To add the MiddleWare to your app you simply need to apply reDoMiddleware to your store

import { reDoMiddleware } from 'redux-re-do';

const store = createStore(yourStore, applyMiddleware(reDoMiddleware));

If you require Thunk's extraArgument you can do this with the CreateReDoMiddleware method.

import { CreateReDoMiddleware } from 'redux-re-do';

const store = createStore(yourStore, applyMiddleware(CreateReDoMiddleware('ExtraArgument'));

Now within your action creators you can use the reDo function to create reDo actions. This method takes a callback function which looks very much like a standard Thunk action.

import { reDo } from 'redux-re-do';

function myActionCreator() {
    return reDo((dispatch, getState, extraArgument) => {
        const currentState = getState();
        dispatch({
            type: 'any-action',
            value: extraArgument
        });
    });
}