Closed martyjg closed 2 years ago
I'm getting the following 2 errors when trying to use my autocomplete component:
You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors. TypeError: Cannot read properties of undefined (reading 'Iv')
You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors.
TypeError: Cannot read properties of undefined (reading 'Iv')
I'm following the getting started steps with loading the map script: const GOOGLE_MAPS_URL =https://maps.googleapis.com/maps/api/js?key=${process.env.NEXT_PUBLIC_PLACES_API_KEY}&libraries=places&callback=initMap`
const GOOGLE_MAPS_URL =
This is happening as I'm trying to update react-dom to 18.1.0. The autocomplete does not work. The previous version major of react-dom doesn't give this error.
This is a next.js project.
use-autocomplete
I'm pretty sure it's related to React 18's StrictMode running useEffect twice.
Bug Report
I'm getting the following 2 errors when trying to use my autocomplete component:
I'm following the getting started steps with loading the map script:
const GOOGLE_MAPS_URL =
https://maps.googleapis.com/maps/api/js?key=${process.env.NEXT_PUBLIC_PLACES_API_KEY}&libraries=places&callback=initMap`This is happening as I'm trying to update react-dom to 18.1.0. The autocomplete does not work. The previous version major of react-dom doesn't give this error.
How to Reproduce
This is a next.js project.
use-autocomplete
Your Environment