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
Passing props down on 1.1.4 version #740
Comments
@matheus-rosin Thanks for reporting this, the only change I did not revert of 1.1.3 is #728, @barakplasma could you take a look at this? Otherwise I might need to revert that too. |
I'll take a look in about 12 hours |
I took a look at the latest version of google-map-react using https://github.com/barakplasma/google-map-react-examples on version 1.1.4 to see if I could recreate the console errors @matheus-rosin encountered, but was unable to recreate them. |
Thanks @barakplasma @matheus-rosin Could you double-check cleaning cache? And if not provide a live example? As we cannot repro we cannot help, thanks. Will re-open when live example available |
So here is the deal: I used the rest operator for getting all props (e.g. Sorry for wasting your time 😅 |
@mattydoincode No problem, that makes sense. |
I am having the same problem,
And using it like this:
At first I tried without the div, seeing if react would have a different way of dealing, but still getting:
|
@exrhizo This library expects react components, not html elements, you should follow the main example in the README and do something like: const AnyReactComponent = (_props) => <Avatar className={classes.customerAvatar} src={CustomerIcon} />;
<GoogleMap {...props}>
<AnyReactComponent
lat={order.latitude}
lng={order.longitude}
/>
</GoogleMap> |
Okay thank you, the problem I was having is that the Material UI Avatar does this: |
I am glad you folks could fix that! |
see comment before. |
I solved it. ` { !isDesktop ? ( ) : ( {place.name} <img className={classes.pointer} src={place.photo ? place.photo.images.large.url : "http://sniblog.co.kr/wp-content/uploads/2018/08/20180819_202541.jpg"} alt={place.name} /> ) } ); } const Map = ({setCoordinates, setBounds, coordinates, places, setChildClicked}) => { <GoogleMapReact ... > { places?.map((place, i) => ( )) } ) ` In fact, I don't know if this is the right solution, but the error has disappeared anyway. |
Yesterday, I upgraded to 1.1.4 because I was getting an error, namely,
window is not defined
. Since then, that was fixed, but now a lot of props is being passed down to children components (at least I suppose). These errors do not break the application, but my console is pretty red.I will list them here just in case you are interested in fix this:
false
for a non-boolean attribute$hover
.;$getDimensions
prop on a DOM element. [...];$dimensionKey
prop on a DOM element. [...];$geoService
prop on a DOM element. [...];$onMouseAllow
prop on a DOM element. [...];true
for a non-boolean attribute$prerender
.;$hover
;$getDimensions
;$dimensionKey
;$geoService
;$onMouseAllow
;$prerender
.The text was updated successfully, but these errors were encountered: