Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new API loader implementation #137

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft

Conversation

usefulthink
Copy link

In preparation for upcoming changes, this extracts the actual loading of the Google Maps API into a separate class.

The new implementation removes a lot of noise from the GoogleMapsProvider and should have a bit more stability especially considering the React strict-mode (we shouldn't have any more problems with running in strict-mode since actual loading is deferred to catch those problems.

Opened as draft PR for review since it still contains debugging comments and testing is ongoing.

* and removing the global `google.maps` object.
*/
static unload(): void {
void this.unloadAsync();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: this is why I had to disable the no-void eslint rule. Using void here makes it very explicit that it wasn't just accidentally forgotten to return the promise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants