Google places autocomplete input for ReactJS with React 19 support.
npm install react-google-places-autocomplete-nextReact 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.
Install the latest version:
``sh`
npm install --save react-google-places-autocomplete-next
or
yarn add react-google-places-autocomplete-next
Use the component!
`js
import React from 'react';
import GooglePlacesAutocomplete from 'react-google-places-autocomplete-next';
const Component = () => (
export default Component;
`
This package supports:
- React 16.8.0+
- React 17.x
- React 18.x
- React 19.x ✨
For detailed documentation, please refer to the original documentation as the API remains the same.
Simply replace the package name in your imports:
`js
// Before
import GooglePlacesAutocomplete from 'react-google-places-autocomplete';
// After
import GooglePlacesAutocomplete from 'react-google-places-autocomplete-next';
`
1. Fork this repo
2. Clone your fork
3. Code 🤓
4. Test your changes
For this, I like to use yalc, as it allows to emulate the process of using npm/yarn.
1. Install yalc
2. Build project with yarn build or npm run buildyalc publish
3. Publish the package with yalc: yalc add react-google-places-autocomplete-next
4. Add the package to your test project yalc update react-google-places-autocomplete-next`
5. If needed, to update the package on your test project:
5. Submit a PR!
This package is based on the excellent work by Nicolás Tinte in the original react-google-places-autocomplete package.
Icons made by Freepik from www.flaticon.com