google-maps-react
google-maps-react copied to clipboard
Type '{ children: never[]; }' is not assignable to type IntrinsicAttributes
Hi, I tried to use <InfoWindow> component and got this error: Type '{ children: never[]; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<InfoWindow> & Readonly<{ children?: ReactNode; }> , I cant even compile this code. I work in SPFX. How to solve this problem? If you need additional info I can provide it.
My code (Error place is InfoWindow)
return (
<Map google={this.props.google} zoom={14} bounds={bounds}>
{this.state.markers.map((marker) => {
return (
<Marker
title={marker['LinkTitle']}
onClick={this.onMarkerClick}
position={{ lat: marker['Latitude'], lng: marker['Longitude'] }} />
)
})}
<InfoWindow>
</InfoWindow>
</Map>
Did you ever solve this? Getting the same issue.
try changing the infoWindow to a single tag <InfoWindow />
try changing the infoWindow to a single tag
Thanks this worked!