react-google-places-autocomplete-next
v1.0.1
Published
Google places autocomplete input for ReactJS with React 19 support.
Maintainers
Readme
React Google Places Autocomplete Next
React component for easily use Google Places Autocomplete with React 19 support.
This is a fork of react-google-places-autocomplete with added React 19 compatibility and ongoing maintenance.
Getting started
Install the latest version:
npm install --save react-google-places-autocomplete-next
or
yarn add react-google-places-autocomplete-nextUse the component!
import React from 'react';
import GooglePlacesAutocomplete from 'react-google-places-autocomplete-next';
const Component = () => (
<div>
<GooglePlacesAutocomplete
apiKey="****"
/>
</div>
);
export default Component;React Version Support
This package supports:
- React 16.8.0+
- React 17.x
- React 18.x
- React 19.x ✨
Documentation
For detailed documentation, please refer to the original documentation as the API remains the same.
Migration from original package
Simply replace the package name in your imports:
// Before
import GooglePlacesAutocomplete from 'react-google-places-autocomplete';
// After
import GooglePlacesAutocomplete from 'react-google-places-autocomplete-next';How to contribute?
Fork this repo
Clone your fork
Code 🤓
Test your changes
For this, I like to use yalc, as it allows to emulate the process of using npm/yarn.
- Install yalc
- Build project with
yarn buildornpm run build - Publish the package with yalc:
yalc publish - Add the package to your test project
yalc add react-google-places-autocomplete-next - If needed, to update the package on your test project:
yalc update react-google-places-autocomplete-next
Submit a PR!
Credits
This package is based on the excellent work by Nicolás Tinte in the original react-google-places-autocomplete package.
