Skip to main content

Compatibility

RequirementSupported
React Native0.78+ (New Architecture required)
Map renderingreact-native-maps
ExpoDevelopment build (not Expo Go)
react-native-nitro-modulesRequired peer dependency
react-native-mapsRequired peer dependency

Peer dependencies

PackageRequired
react-native-nitro-modulesYes
react-native-mapsYes (for the main MapView export)

Migrate from react-native-map-clustering

The main export is the clustered MapView. react-native-better-clustering/compat is a backwards-compatible alias.

- import MapView from 'react-native-map-clustering'
+ import MapView from 'react-native-better-clustering'

Supported props include radius, minPoints, minZoom, maxZoom, extent, nodeSize, clusteringEnabled, onClusterPress, clusterColor, clusterTextColor, spiralEnabled, renderCluster, and standard react-native-maps MapView props.

Known fixes over react-native-map-clustering

IssueStatus
Crash on NaN zoom (#294)Guarded
Map size can't be 0 on Android (#285)Layout-aware
maxZoom / spiralEnabled ignored (#274, #275)Implemented
Unstable clusters on zoom (#255)Stable references
Per-marker cluster={false} (#297)Supported

Migrate from react-native-clusterer

For custom map stacks, use advanced subpaths:

react-native-clustererThis package
useClusterer/hooks
Supercluster/engine
isClusterFeature/geojson

Extra: clusterProperties map/reduce aggregation via /engine.