google-maps-react icon indicating copy to clipboard operation
google-maps-react copied to clipboard

Type '{ children: never[]; }' is not assignable to type IntrinsicAttributes

Open JhonBlack opened this issue 7 years ago • 3 comments

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>

JhonBlack avatar Jan 24 '19 15:01 JhonBlack

Did you ever solve this? Getting the same issue.

jarethuk avatar Aug 24 '19 18:08 jarethuk

try changing the infoWindow to a single tag <InfoWindow />

LiJonSeowDev avatar Sep 14 '20 12:09 LiJonSeowDev

try changing the infoWindow to a single tag

Thanks this worked!

TravisBoyd884 avatar May 03 '23 18:05 TravisBoyd884