yuzhva / react-leaflet-markercluster

React wrapper of the official Leaflet.markercluster for react-leaflet
https://yuzhva.github.io/react-leaflet-markercluster/
MIT License
285 stars 99 forks source link

react.development.js Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. #195

Closed Kumail09 closed 1 year ago

Kumail09 commented 1 year ago
  return (
  <>
  <MarkerClusterGroup>
  {
    data?.features?.map((p) => (
    <Marker key={p.id.toString()} position={[p.geometry.coordinates[1], p.geometry.coordinates[0]]} icon={iconDiv} />
  ))
  }
  </MarkerClusterGroup>
  </>
  )