Native execution
H3 4.5.0 runs as compiled C++ on iOS and Android, called directly through Nitro Modules.
for compactCells on a k=20 disk containing 1,261 cells. iPhone XS, iOS 18.7.9, React Native
0.87.0, Hermes, 20-run median, 2026-09-01. Every result was verified against h3-js 4.5.0 for
equivalence.
Native execution
H3 4.5.0 runs as compiled C++ on iOS and Android, called directly through Nitro Modules.
bigint cell indexes
H3’s 64-bit indexes stay numeric. No hexadecimal strings cross the JavaScript boundary, and
functions keep the h3-js names, with unit suffixes instead of a unit argument.
Typed-array results
A cell set arrives as one BigUint64Array over the buffer C++ produced, viewed in place instead
of copied per element.
Batch calls
latLngsToCells, cellsToLatLngs and cellsToBoundaries process a whole coordinate or cell
array in a single native call, the last answering every cell’s boundary as [lat, lng] pairs in
one flat buffer.
Async variants
Four async variants move the expensive calls to a background thread and resolve with the same typed arrays.
Optional cell ceiling
configure() sets a ceiling that rejects an unexpectedly large result before allocation. Off by
default.
Add the package together with Nitro Modules.
bun add react-native-nitro-h3 react-native-nitro-modulesInstall the iOS pods.
cd ios && pod installRebuild the app so the native module is linked, with npx react-native run-ios or npx react-native run-android.
Add the package together with Nitro Modules.
npm install react-native-nitro-h3 react-native-nitro-modulesInstall the iOS pods.
cd ios && pod installRebuild the app so the native module is linked, with npx react-native run-ios or npx react-native run-android.
Add the package with the Expo CLI.
npx expo install react-native-nitro-h3 react-native-nitro-modulesGenerate the native projects.
npx expo prebuildExpo Go cannot load native modules. Use a development build with npx expo run:ios or npx expo run:android.
Built on the H3 C library 4.5.0 by Uber, vendored in the package and recorded in
third_party/h3/H3_VERSION. Every function is verified against h3-js 4.5.0 for equivalence in CI.
Functions keep the h3-js names, with unit suffixes instead of a unit argument. Cells are bigint,
cell sets are a BigUint64Array over native memory, and nothing is parsed on the JavaScript side.
import { gridDisk, latLngToCell } from 'react-native-nitro-h3'
const cell = latLngToCell(37.7749, -122.4194, 9) // 0x89283082803ffffnconst ring = gridDisk(cell, 1) // BigUint64Array of 7 cells