RE

React Mapbox

@vis.gl/react-mapbox

React components for Mapbox GL JS

Utilities
mapbox
mapbox-gl
react
react mapbox
@vis.gl/react-mapbox
Utilities
javascript
npm
frontend
open source
Stars
8.5k
Weekly
1.1M
Open issues
95
Bundle
~25 kB

Installation

npm install @vis.gl/react-mapbox

Code example

import { useMapbox } from "@vis.gl/react-mapbox";

export function Example() {
  const value = useMapbox();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by pessimistress
  • 1.1M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 95 open issues on GitHub

FAQs

Alternatives & similar libraries