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

expo-custom-refresh

v0.0.1

Published

Customizable pull-to-refresh for React Native lists. Drop-in RefreshControl replacement with support for custom animations, Lottie, skeletons, and more.

Readme

expo-custom-refresh

Customizable pull-to-refresh for React Native lists. Use any React component as your refresh indicator: Lottie animations, skeleton loaders, branded spinners, or anything else.

Works with FlatList, FlashList, and ScrollView.

Why

React Native's built-in RefreshControl only renders the platform-default spinner. You can change its color, but you can't replace it with custom UI. This module gives you full control over what renders during pull-to-refresh, with native scroll physics on both platforms.

Install

npm install expo-custom-refresh

For bare React Native projects, run npx pod-install after installing.

Usage

import { CustomRefreshControl } from 'expo-custom-refresh';

function MyList() {
  const [refreshing, setRefreshing] = useState(false);

  const onRefresh = async () => {
    setRefreshing(true);
    await fetchData();
    setRefreshing(false);
  };

  return (
    <CustomRefreshControl
      refreshing={refreshing}
      onRefresh={onRefresh}
      renderIndicator={({ progress, state }) => (
        <MySpinner progress={progress} active={state === 'refreshing'} />
      )}
    >
      <FlatList data={items} renderItem={renderItem} />
    </CustomRefreshControl>
  );
}

The renderIndicator function receives:

  • progress - A number from 0 to 1 representing how far the user has pulled
  • state - One of 'idle', 'pulling', 'triggered', or 'refreshing'

Props

| Prop | Type | Default | Description | | ------------------ | ---------------------- | -------- | ----------------------------------------- | | refreshing | boolean | required | Whether a refresh is in progress | | onRefresh | () => void | required | Called when the user triggers a refresh | | renderIndicator | (props) => ReactNode | required | Render function for the refresh UI | | triggerThreshold | number | 80 | Pull distance (points) to trigger refresh | | indicatorHeight | number | 60 | Height of the indicator area |

Refresh states

| State | Description | | ------------ | -------------------------------------------------------- | | idle | No pull in progress | | pulling | User is pulling but hasn't reached the threshold | | triggered | User pulled past the threshold (will refresh on release) | | refreshing | Refresh is in progress |

Requirements

  • Expo SDK 51+
  • React Native 0.74+
  • iOS 15.1+
  • Android API 21+

License

MIT