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

@bigdatacloudapi/react-native-client

v1.0.0

Published

Official React Native client for BigDataCloud free APIs — reverse geocoding and roaming detection. GPS-first, no API key required.

Readme

BigDataCloud React Native Client

npm License: MIT

Official React Native client for BigDataCloud free APIs — reverse geocoding and roaming detection.

No API key required. Works with Expo and bare React Native.

Installation

npm install @bigdatacloudapi/react-native-client

With Expo (recommended):

npx expo install expo-location

Bare React Native:

npm install @react-native-community/geolocation

Permissions

Expo (app.json)

{
  "expo": {
    "plugins": [
      ["expo-location", {
        "locationWhenInUsePermission": "Used to show your current city and country."
      }]
    ]
  }
}

Bare React Native (AndroidManifest.xml)

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

iOS (Info.plist)

<key>NSLocationWhenInUseUsageDescription</key>
<string>Used to show your current city and country.</string>

Quick Start

import { useReverseGeocode } from '@bigdatacloudapi/react-native-client';

export default function MyScreen() {
  const { data, loading, accuracy } = useReverseGeocode();

  if (loading) return <ActivityIndicator />;

  // Always show the accuracy level — never silently present IP-based as GPS
  const label = {
    FINE:     'GPS location',
    COARSE:   'Approximate location',
    IP_BASED: 'IP-based — enable location for better accuracy',
  }[accuracy ?? 'IP_BASED'];

  return (
    <View>
      <Text>{data?.response.city}, {data?.response.countryName}</Text>
      <Text>{label}</Text>
    </View>
  );
}

Location Strategy

  1. FINE (GPS)expo-location with Accuracy.High (or RN Geolocation with enableHighAccuracy: true). Always requested first.
  2. COARSE (network/wifi) — returned automatically when GPS accuracy is reduced.
  3. IP_BASED — no coordinates available. Server uses caller's IP. Only when all location is denied.

Always surface the accuracy value to your users. Never silently present IP_BASED results as GPS.

Roaming Detection

import { useAmIRoaming } from '@bigdatacloudapi/react-native-client';

export default function RoamingScreen() {
  const { data, loading } = useAmIRoaming();

  if (loading) return <ActivityIndicator />;

  return (
    <Text>
      {data?.isRoaming
        ? `Roaming in ${data.roamingCountryName}`
        : 'Not roaming'}
    </Text>
  );
}

API

useReverseGeocode(localityLanguage?)

| Return | Type | Description | |--------|------|-------------| | data | GeocodeResult \| null | Response + accuracy level | | loading | boolean | True while fetching | | error | Error \| null | Any error that occurred | | accuracy | AccuracyLevel \| null | 'FINE', 'COARSE', or 'IP_BASED' | | refresh | () => void | Re-trigger detection |

useAmIRoaming()

| Return | Type | Description | |--------|------|-------------| | data | RoamingResponse \| null | Roaming status | | loading | boolean | True while fetching | | error | Error \| null | Any error | | refresh | () => void | Re-trigger |

Fair Use Policy

This library uses BigDataCloud's free client-side reverse geocoding API (api.bigdatacloud.net), governed by the Fair Use Policy.

This API is for resolving the current, real-time location of the calling device only.

Key rules:

  • Client-side only — requests must originate directly from the device being located, not from a server or automated script
  • Real-time coordinates only — only live GPS/WiFi coordinates obtained at the moment of the call are permitted. Pre-stored, cached, or externally-sourced coordinates are strictly not allowed
  • User consent required — coordinates must be obtained via platform geolocation APIs with the user's explicit permission

Violations result in a 402 error and your IP address being banned.

If you need to geocode coordinates you already have, or need server-side geocoding, use the Reverse Geocoding API with a free API key instead — it includes 50,000 free queries per month.

License

MIT — see LICENSE.