Wrap elements in custom component #2319
Unanswered
eggerand13
asked this question in
Q&A
Replies: 1 comment
-
please provide minimal reproduction in codesandbox.io |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
thank you very much for creating this awesome project. It works really well and makes using it in React a real breeze. However, I have one problem I can't seem to find a solution for. I want to wrap one or more component(s) in a custom component (so that I can have easier control over state) but it doesn't work.
For example:
When I place a Polygon in the map like this it will work just fine:
<LoadScript googleMapsApiKey="XXXXXXXXXXXXXXXXXXXXXXXXXXXX" > <GoogleMap mapContainerStyle={containerStyle} zoom={10} > <Polygon paths={geo.coordinates} /> </GoogleMap> </LoadScript>
However as soon as I wrap this Polygon in a custom component, it will not be displayed on the map.
Is it this generally not possible?
Thank you for any help.
Beta Was this translation helpful? Give feedback.
All reactions