This is a Google Places Autocompelte Material UI project bootstrapped with vite
.
Library used to fetch places from google - use-places-autocomplete
.
First, install the dependencies:
yarn
# or
npm install
Run the development server:
yarn dev
# or
npm run dev
Enable Places API
in your google cloud project.
Setup Google cloud project
if you don't have one.
Then, replace the API_KEY
in the script inside index.html file with your API KEY
generated in the google cloud dashboard.
Open http://localhost:5173 with your browser to see the result.
The src/PlacesAutocomplete
component is the one that uses the use-places-autocomplete
.