Index of every page on this site: llms.txt
All skills
gmi-software avatar

/react-native-better-clustering

@443959a
Run it yourself

Expert guide to react-native-better-clustering — a drop-in clustered MapView for react-native-maps backed by a C++ supercluster engine over Nitro/JSI. Use when installing, configuring, or debugging it; when clustering is slow, wrong, or flickering; when handling thousands of map markers; when migrating from react-native-map-clustering or react-native-clusterer; and when changing the library's TypeScript, C++, or Nitro specs. Also use before writing any performance claim about map clustering, pan, zoom, or marker frame rate.

  • 11 files
  • 102.9 KB
  • MIT
  • Updated 3 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/gmi-software/better-skills/react-native-better-clustering

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesmigration.md

≈650 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Migration

Grounded in library README.md, docs/docs/compatibility.md, and ADR 0001. Do not invent prop parity beyond what those sources and ClusteredMapViewProps list.

Setup after swap: setup.md. API surface: api.md. Aggregation limits: aggregation.md.

From react-native-map-clustering

One-line import swap (documented migration):

- import MapView from 'react-native-map-clustering'
+ import MapView from 'react-native-better-clustering'
  import { Marker } from 'react-native-maps'

/compat is the same module as the root export.

What you can infer from source

  • Root export is the clustered MapView (ADR 0001).
  • Marker children and many clustering props continue to work through ClusteredMapViewProps + forwarded RN Maps props (...restProps).
  • Documented fixes over the old library (NaN zoom guard, Android zero-size fitToCoordinates, maxZoom / spiralEnabled, stable cluster references, per-marker cluster={false}) are listed in README / compatibility docs — verify behaviour in your app, do not treat the table as a test suite.

What you must not invent

  • Exact 1:1 parity with every historical react-native-map-clustering prop or quirk unless it appears on ClusteredMapViewProps or is forwarded via RN Maps MapViewProps.
  • That clusterProperties works on root MapView — it does not (aggregation.md).
  • Performance guarantees ("10k+ without bridge jank") — measure (performance.md).

Setup after swap

New Architecture + Nitro peers + Reanimated/Worklets + maps key. setup.md.

From react-native-clusterer

Compatibility docs map subpaths:

react-native-clusterer This package
useClusterer /hooks
Supercluster /engine
isClusterFeature /geojson

Extra vs clusterer (documented): declarative clusterProperties aggregation on /engine / /hooks (C++ sum | min | max only — not arbitrary JS reducers).

regionToBBox padding matches react-native-clusterer parity (4× visible area) — algo.md.

Cannot be inferred without reading your app

  • Whether your custom map stack expects half-delta bboxes
  • Whether you relied on JS-supercluster-only APIs
  • Whether Google vs Apple Maps was the real performance difference (debugging.md)

When unsure: open package/src/compat/MapView.tsx and package/src/engine/types.ts, then write a small headless loadAsync + getClustersFromRegion fixture before changing production UI.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 443959a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 3 months ago
Other metadata
metadata
{
  "package": "react-native-better-clustering",
  "version": "1.0.0",
  "commit": "7c7d659046a3d1bb8b7d4cb06a94f6e0d509862e",
  "verified": "2026-08-21",
  "repository": "https://github.com/gmi-software/react-native-better-clustering",
  "audience": "library users and library contributors",
  "tags": "react-native, clustering, maps, markers, geospatial, supercluster, nitro, jsi, cpp, performance, ios, android, expo"
}

README badge

README badge for gmi-software/better-skills/react-native-better-clustering