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

reasync

v1.0.0-rc.4

Published

Library for connecting react components to async actions like fetching

Readme

REASYNC

Library for connecting React components to async actions like fetching

##Warning

The package is currently in beta version. Use with own risk. It's used in production on own closed-source app.

Docs

Why I need this?

Let's say we have universal application. We want to fetch some data on server, before server render. We also want to do some work only on server, before render and we want to track server action to let's say google analytics after render.

On the client, we hydrate app with data from server, but if server fail we want to fetch data from client. After data are fetched we want to start rendering, then fetch some data after render, you want do some action only on client and when everything is done we want to track some actions to analytics too. We want to track actions even if something before failed. We want to show user some loader before transition is done.

You can configure lifecycle of this events with reasync.

Why I have created this package?

Long time ago, few people started using react-redux project for managing routing state in redux. In those times, idea of prefetching and deferred fetching was used making router transition from one route to another more sophisticated. React-redux package was awesome, but it stared to get bloated and handling to much and it was also complicated to setup.

People started to migrate to react-router-redux, which was much more simplified, but it was not possible to easily create react-redux transition functionality. I found it awesome to be able to delay transition and to fetch data or do any other async work when i want to.

This package is not about how to fetch data, query some storage or another async actions. It's about way to tell, when i need to execute that async action. Do I need some data before server start to render? Do I need to track something only on server? Or load some storage only on client? Do I need them before page is shown to client? And what should be done before transition, what after?

Used in

Package was extracted from non-oss project, but it is used in my boilerplate:

Related projects

Future

There's so much to do, like write tests, simplify usage, cleanup the mess