finds.dev← search

// the find

alex3165/react-mapbox-gl

★ 1,988 · TypeScript · MIT · updated Sep 2023

A React binding of mapbox-gl-js

A React wrapper around mapbox-gl-js that exposes map layers, sources, markers, popups, and controls as React components. Targets developers who want to embed Mapbox maps in a React app without managing the imperative mapbox-gl API directly.

The Layer/Feature abstraction maps cleanly to mapbox-gl's data model — you get GeoJSON, symbols, fills, extrusions, and heatmaps all as React children without fighting the imperative API. The array trick for zoom/bearing/pitch is a genuinely good solution to the React referential equality problem for map state sync. TypeScript throughout with good coverage. The Cluster component handles the painful supercluster integration that most people get wrong.

Last commit was September 2023 and the Travis CI badge is already a red flag — this project is effectively unmaintained. mapbox-gl-js has moved well past v1.x but the README still references v1.10.1 CSS; compatibility with current Mapbox versions is uncertain. No React 18 concurrent mode support — the imperative mapbox-gl lifecycle and React's new rendering model have known conflicts that this wrapper doesn't address. The zoom/bearing/pitch-as-arrays pattern is a workaround for a broken design; it leaks the impedance mismatch into every caller rather than handling it internally.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →