Osama
Osama
``` const { placePredictions, getPlacePredictions, isPlacePredictionsLoading, } = usePlacesService({ apiKey: `${process.env.REACT_APP_MAPS_API_KEY}&loading=async` , debounce: 500 }); ``` I am using `usePlacesAutocompleteService` but you may try on `usePlacesWidget` as well. This solved...
> > ``` > > const { > > placePredictions, > > getPlacePredictions, > > isPlacePredictionsLoading, > > } = usePlacesService({ > > apiKey: `${process.env.REACT_APP_MAPS_API_KEY}&loading=async` , > > debounce: 500...
> > > I tried this method: > > > ``` > > > apiKey: `${apiKey}&loading=async`, > > > ``` > > > > > > > > > >...
As a workwround, I no longer provide the apiKey prop to `usePlacesService` and iinstead load the maps api through a custom hook which looks like this: `useGoogleMapsApi.js` ``` import {...