extended-component-library icon indicating copy to clipboard operation
extended-component-library copied to clipboard

Document correlation to @googlemaps/react-wrapper library

Open tobiasbueschel opened this issue 2 years ago • 2 comments

Thanks for this library 🙏 great to have an official Google library that supports React components too. However, for the React example here in the repo are there also wrapper components for gmp-map and gmp-advanced-marker or should one mix this library with https://github.com/googlemaps/react-wrapper?

tobiasbueschel avatar Nov 18 '23 17:11 tobiasbueschel

If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.

@tobiasbueschel Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

wangela avatar Nov 18 '23 17:11 wangela

Thanks for the comment! As you notice, in the React example we use <gmp-map> and <gmp-advanced-marker> without any wrappers. These web components come directly from the Maps JS API, which is in turn loaded/configured from the API Loader component in the current library -- nothing else required to use them. See this line.

https://github.com/googlemaps/react-wrapper is a single-purpose library for loading the Maps JS API in the context of a React app. This should work if you mix it with the Extended Component Library, but I'd recommend sticking with the API Loader component instead: it's designed to work cross-framework (i.e. not specific to React) and is what we test against.

awmack avatar Nov 20 '23 18:11 awmack