Showcase
Audience: package users who want to see the package inside an app. One app, five acts, every cell computed on the phone by
react-native-nitro-h3. Each act is a pattern you can lift into your own app.
Watch the video (25.6 seconds, no sound).
The showcase is not a benchmark. It puts the package where it will actually run: under a map, inside a gesture, on a JS thread that also has to animate. It shows what a hexagonal grid buys you once it is cheap: a grid that follows the viewport, a drill-down that costs one call, a neighbourhood that grows ring by ring, a million points folded into a few hundred cells, and a track stored as cells instead of coordinates.
A readout in every act watches the JS thread and reports the longest block of the run, making the true cost of every step visible.
The five acts
Section titled “The five acts”gridDisk · gridDiskDistances · cellToParent · cellsToBoundaries
A grid that picks its resolution from the zoom and rebuilds while you pinch, at most every 120 ms, then once more where the map settles. Each cell is coloured by its ring distance inside its parent. This act takes the classic path, cell boundaries as a GeoJSON string for MapLibre, and the panel shows what that string costs next to the JS thread readout.
🎯 Derive spatial layers directly from the viewport.
coverage layers pricing zones service areas cells instead of polygons
Fractal city
Section titled “Fractal city”cellToChildren · cellToParent
Tap a cell and it splits into its seven children; long-press and they fold back into the parent. Every split is one call, so the detail follows your finger.
🎯 Drill down where the data is dense.
drill-down analytics adaptive detail a resolution per region
Magnetic grid
Section titled “Magnetic grid”gridRing · gridDisk
Drag the slider to grow the neighbourhood up to 50 rings (7,651 cells). Each ring is computed once and kept, so the slider never waits for a ring it already has.
🎯 Run proximity queries without heavy geometry.
everything within n cells widening search radius buffers
Heatmap
Section titled “Heatmap”latLngsToCells
A million noisy points are binned into cells in a single batch call. The map draws a few hundred hexagons instead of a million overlapping markers.
🎯 Aggregate heavy data before it hits the map.
density maps hotspot detection event aggregation telemetry
latLngToCell · gridPathCells
A fast-forwarded GPS track where every fix is snapped to a cell. If the signal drops, the package computes the missing cells and bridges the gap.
🎯 Track continuous movement without storing raw coordinates.
movement analytics visited areas data minimisation privacy by resolution
Every number on screen is measured on the device, in the run you are looking at. The documented factors in the Benchmark report come from a Release build; a development build runs slower on both sides.