https://google-autocomplete-api-react-demo.netlify.app
Demo project showing how to set up a React input component with autocomplete functionality using Google APIs.
Suggestions are shown as a plain list in this demo. Normally, you'll want to render them in a suggestions popover below the input.
➡️ For more info, out this step-by-step tutorial: Simple guide to implementing a place/address autocomplete input with Google APIs and React
- Set up a Google Cloud project
- Enable the Maps JavaScript API and the Places API.
- Create an access token to use those APIs, and set it in
.env.local
with nameREACT_APP_GOOGLE_MAPS_API_API_TOKEN
Run npm install
and npm run start
to kick it off locally.
It was made with care starting from Create React App. Create React App is not dead!