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

react-native-fetch-kit

v0.1.0

Published

Resilient fetch utilities for React Native — timeouts, retries, and typed JSON helpers

Readme

react-native-fetch-kit

CI npm version License: MIT

Resilient fetch utilities for React Native apps — timeouts, retries, typed JSON parsing, and a lightweight data-fetching hook.

Built by Rajan Kumar · Senior Frontend Developer · React Native

Pairs well with react-native-web3-kit for mobile Web3 apps.

Install

npm install react-native-fetch-kit
# or
yarn add react-native-fetch-kit

Features

  • Timeout support — abort slow requests automatically
  • Retry with backoff — retry 408, 429, and 5xx responses
  • Typed JSON helpersfetchJson, parseJson, FetchKitError
  • Query buildersbuildQuery, withQuery
  • React hookuseFetch with loading/error/refetch state

Usage

Fetch JSON with retries

import { fetchJson } from "react-native-fetch-kit";

const profile = await fetchJson<{ id: string; name: string }>(
  "https://api.example.com/profile",
  { headers: { Authorization: "Bearer token" } },
  { timeoutMs: 8000, retries: 2 }
);

Custom fetch wrapper

import { createFetcher } from "react-native-fetch-kit";

const api = createFetcher({ timeoutMs: 10_000, retries: 3 });

const response = await api("https://api.example.com/wallets");
const wallets = await response.json();

Query params

import { withQuery } from "react-native-fetch-kit";

const url = withQuery("https://api.example.com/tokens", {
  chainId: 1,
  limit: 20,
});

React hook

import { useFetch } from "react-native-fetch-kit";

function ProfileScreen() {
  const { data, loading, error, refetch } = useFetch<{ name: string }>(
    "https://api.example.com/me"
  );

  if (loading) return <Text>Loading...</Text>;
  if (error) return <Text>{error.message}</Text>;

  return (
    <>
      <Text>{data?.name}</Text>
      <Button title="Refresh" onPress={refetch} />
    </>
  );
}

API

| Export | Description | |--------|-------------| | createFetcher | Fetch wrapper with timeout + retry | | fetchJson | Fetch and parse JSON in one call | | parseJson | Parse JSON or throw FetchKitError | | buildQuery | Build ?key=value query string | | withQuery | Append query params to a URL | | useFetch | React hook for API requests | | FetchKitError | Normalized fetch error type |

Development

npm install
npm test
npm run build

License

MIT © Rajan Kumar