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

@hammim-in/react-native-places-autocomplete

v0.1.4

Published

> ✅ **Supports React 19**

Readme

React Native Places Autocomplete

Supports React 19

A lightweight, customizable, and easy-to-use Google Places Autocomplete component for React Native apps.
Built using Google Places API for fast location search with minimal setup.


✨ Features

  • 🔥 Lightweight and fast
  • 🛠️ Fully customizable UI
  • 🧠 Smart debounce (reduces API calls)
  • 🌍 Supports additional Google Places API query parameters (language, components, sessiontoken, etc.)
  • 🚀 Works out of the box for iOS and Android
  • 📝 Written fully in TypeScript

📦 Installation

npm install @hammim-in/react-native-places-autocomplete
# or
yarn add @hammim-in/react-native-places-autocomplete

Usage

import PlacesAutocomplete from '@hammim-in/react-native-places-autocomplete';

export default function App() {
  return (
      <PlacesAutocomplete
        query={{
          language: 'en',              // Optional
          components: 'country:us',    // Optional
        }}
        placeholder="Search places..."
        onPress={(data) => {
          console.log('Selected Place:', data);
        }}
        apiKey='YOUR_GOOGLE_API_KEY' // Required
      />
  );
}

🛠️ Props

| Prop Name | Type | Required | Description | |:----------|:-----|:---------|:------------| | apiKey | string | ✅ Yes | Google Places API query configuration. Must include at least the API key. | | query | Query | ❌ No | Optional to filter search ressult. | | placeholder | string | ❌ No | Placeholder text for the search input. Defaults to "Search for places". | | onPress | (data: GooglePlaceData) => void | ❌ No | Callback function triggered when a place is selected. |

📋 Query Object

The query prop expects an object with the following structure:

| Key | Type | Required | Description | |:----|:-----|:---------|:------------| | language | string | ❌ No | Preferred language for results. Example: 'en', 'fr'. | | components | string | ❌ No | Restrict results to a specific country. Example: 'country:us'. | | sessiontoken | string | ❌ No | (Optional) Session token for billing optimization. | | ...and others (offset, location, radius, strictbounds, rankby) |

🔔 Note: key is mandatory; others are optional based on your use-case.

🎨 Customization

You can easily customize:

  • Input field styles
  • Loading indicator
  • Result item styles
  • Clear button (✖️)
  • Debounce timing (default 500ms in code, editable)
  • Placeholder text color and input text color

🚀 Advanced Usage

You can extend and modify the component for:

  • Handling session tokens to optimize Google billing.
  • Limiting to specific place types (e.g., addresses only).
  • Adding your own custom render item for search results.
  • Adding location bias with latitude/longitude.

🧩 Types

GooglePlaceData

interface GooglePlaceData {
  description: string;
  id: string;
  place_id: string;
  reference: string;
}

interface Query {
  sessiontoken?: string;
  offset?: number;
  location?: string;
  radius?: number;
  components?: string;
  rankby?: string;
  language?: string;
  strictbounds?: boolean;
}

Example for Screenshots section:

## 📸 Screenshots

| Search Input | Search Results |
|:-------------|:---------------|
| ![Input Example](link-to-image-1) | ![Result Example](link-to-image-2) |

📄 License

MIT License © 2025 Ham Mim

🙌 Support

If you find any issues or have a feature request, feel free to open an issue.

Or contact: [email protected]

🚧 Future Improvements (Coming Soon)

  • Customizable debounce delay
  • Add current location ("Use my location") button
  • Styling props for better theming
  • Support reverse geocoding
  • Localization for different languages