react-google-maps-api icon indicating copy to clipboard operation
react-google-maps-api copied to clipboard

Type Error in LoadScript.tsx

Open pimjunhavittaya opened this issue 10 months ago • 4 comments

Hi Team,

When I run build I got this error: Image

This is how I call useLoadScript in my code

export const GOOGLE_MAP_CONFIGS: UseLoadScriptOptions = {
  id: 'map',
  googleMapsApiKey: env.nextPublicGoogleMapsApiKey ?? '',
  libraries: ['marker', 'places'],
};

const { isLoaded } = useJsApiLoader(GOOGLE_MAP_CONFIGS);

My Packages: React: 19.0.0 react-dom: 19.0.0 typescript: 5.7.3 @react-google-maps/api: 2.20.5 next: 15.1.5

pimjunhavittaya avatar Jan 27 '25 09:01 pimjunhavittaya

Please provide a PR and I will merge

JustFly1984 avatar Jan 30 '25 03:01 JustFly1984

@JustFly1984 ,

I cannot create a PR due to permission error:

Image

Can you please help to update the following files?: packages/react-google-maps-api/src/LoadScript.tsx packages/react-google-maps-api/src/useLoadScript.tsx

I attached them in the zip file: Archive.zip

I have tested with both React 18 and React 19.

pimjunhavittaya avatar Feb 04 '25 07:02 pimjunhavittaya

@pimjunhavittaya that is not how PR works. You should fork the repo, make changes in your own repo, and make a PR from your repo into mine, and I will accept it and release new version.

PS: please use branch upgrade as target for the repo.

JustFly1984 avatar Feb 05 '25 04:02 JustFly1984

@JustFly1984 , I have created PR.

pimjunhavittaya avatar Feb 05 '25 06:02 pimjunhavittaya