ubilabs / google-maps-react-hooks

The JavaScript library to easily implement a Google Maps map into your react application. It comes with a collection of React hooks to access the map instance or different Maps JavaScript Services.
MIT License
77 stars 13 forks source link

fix(google-maps-provider): quick fix google maps check #121

Closed BiniCodes closed 1 year ago

BiniCodes commented 1 year ago

So this was sometimes occuring:

image

I think you wanted to handle this via isLoadingAPI, no? @plumdumpling This fixes it for now, but we got to recheck the loading of the script tag as the state of isLoadingAPI is false sometimes when loading the script and I think this is the main problem.

BiniCodes commented 1 year ago

Tests should work after merging: https://github.com/ubilabs/google-maps-react-hooks/pull/120

BiniCodes commented 1 year ago

I think you wanted to handle this via isLoadingAPI, no? @plumdumpling

Yes, the isLoadingAPI state should do this. Please let's see what's wrong with it and fix it there.

Added a comment above the code for the check as I currently do not see another way :)