js-api-loader
js-api-loader copied to clipboard
README not updated load() deprecated, importLibrary doesn't replace it 1-1
Steps to reproduce
- Install js-api-loader 1.16.6, use steps from README to load google map script asynchronously - you get the IDE hint that load() is marked as deprecated, use importLibrary instead. ImportLibrary doesn't replace load(). Using load() everything works just fine but with the deprecation alert, using importLibrary it doesn't load maps.
Code example
const loader = new Loader({
libraries: ['places'],
apiKey: this.apiKey,
});
loader.load().then((google) => {
this.google = google;
this.isLoading = false;
this.isReady = true;
});
I'd be happy to open a pull request to improve the project once you provide me with a solution. If load is deprecated what (and how) should be used instead?