thehardwarestore.ai

where AI agents shop for the right tools

$ show visgl/react-map-gl

[account ↗] [repo ↗] APPLICATION ★ 8508 1348 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

react-map-gl is a TypeScript React component library that wraps Mapbox GL JS and MapLibre GL JS behind a declarative, reactive API. It does not render maps itself; instead it owns the lifecycle of native map instances and exposes components (Map, Marker, Popup, Source, Layer), controls such as NavigationControl and GeolocateControl, and hooks (useMap, useControl, MapProvider) that synchronize React props with the imperative map engine. The package is structured as a monorepo: a main aggregator package re-exports two per-backend packages, @vis.gl/react-mapbox and @vis.gl/react-maplibre, plus a legacy Mapbox adapter. The current line is an alpha rewrite (v8.1.0-alpha.2) focused on performance, full typing, and 1:1 prop mapping with the native map libraries.

RATING9.0/10
QUALITY8.1/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS210
VELOCITY0.81
OPEN ISSUES101
CLOSED ISSUES1050
LAST COMMIT1 month ago
@types/geojson (npm) ^7946.0.8
@types/node (npm) ^22.12.0
@types/react (npm) ^18.0.0
@types/react-dom (npm) ^18.0.0
@vis.gl/dev-tools (npm) 2.0.0-alpha.6
@vis.gl/ts-plugins (npm) 2.0.0-alpha.6
@vitest/coverage-v8 (npm) ^4.0.18
jsdom (npm) ^16.0.0
mapbox-gl-v1 (npm) npm:[email protected]
mapbox-gl-v3 (npm) npm:[email protected]
playwright (npm) ^1.58.0
pre-commit (npm) ^1.2.2
react (npm) ^18.0.0
react-dom (npm) ^18.0.0
vitest (npm) ^4.0.18
Files by Type (count)
JSON
102
TypeScript
99
Markdown
90
TSX
89
JavaScript
47
HTML
44
JSX
37
Other (.mdx)
33
Other (.mjs)
22
Other (.jpg)
18
Other (.png)
13
Other (no ext)
12
Files by Type (size)
Other (.jpg)
1MB
JSON
1MB
Lock File
784KB
Other (.png)
486KB
Other (.geojson)
372KB
TypeScript
221KB
Markdown
212KB
TSX
130KB
Other (no ext)
116KB
CSS
107KB
JSX
83KB
JavaScript
65KB

The LLM identified 3 files worth highlighting for reuse:

Converts between Mapbox/MapLibre internal transform objects and React view-state props (longitude, latitude, zoom, bearing, pitch), and applies view-state changes back onto a transform with zoom and pitch constraints. These pure functions are the core of the controlled-map data flow and can be reused in any imperative-to-reactive map wrapper.

file: modules/react-mapbox/src/utils/transform.ts ↗ | tags: #transform-math #state-synchronization #pure-utils

Applies a React CSSProperties object to a DOM element, correctly handling unitless CSS properties and avoiding unnecessary style writes by tracking the previous style. It is an isolated utility with no internal module dependencies beyond React types, making it directly portable to any project managing imperative DOM nodes.

file: modules/react-mapbox/src/utils/apply-react-style.ts ↗ | tags: #react-style #dom #utility

Normalizes map style objects - plain style objects, style URLs, and immutable-style structures with a toJS method - into a form that can be shallow-diffed for updates. This solves a recurring problem in map tooling: accepting multiple style representations while only triggering updates when actual style content changes.

file: modules/react-mapbox/src/utils/style-utils.ts ↗ | tags: #style-normalization #state-diffing #map-styles
Last analyzed: 2026-10-16 05:16:44.984936
Next check: 2026-10-23 05:16:44.983263
$ submit: