
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
react-mapbox-ui
Advanced tools
MapboxUI provides a minimal layer of abstraction for composing mapbox-gl UI's in an idiomatic React way.
MapboxUI provides a minimal layer of abstraction for composing mapbox-gl UI's in an idiomatic React way.
This library does not provide out of the box components for mapbox layers, sources, markers, etc. This can easily be achieved with composition. See Usage for an example below.
yarn add react-mapbox-ui
# or
npm i react-mapbox-ui
See TypeDocs.
Composing your own MapboxUI components.
// ./examples/Marker.tsx
import { MapboxUI, useMapboxUIEffect } from "react-mapbox-ui";
import "mapbox-gl/dist/mapbox-gl.css";
const accessToken = "your access token";
const centerCoorindates: LngLatLike = [-79.347015, 43.65107]; // Toronto
type MarkerProps = { coordinates: LngLatLike };
/**
* Creating a <Marker/> component.
* Most of your MapboxUI components will be renderless and hook into MapboxUI context with hooks
* This allows consumers to manage their own Mapbox side effects with effect lifecycles
**/
const Marker: React.FC<MarkerProps> = ({ coordinates }) => {
// useMapboxUIEffect provides you with MapboxUI context wrapped in a useEffect
useMapboxUIEffect(
({ map, mapbox }) => {
const marker = new mapbox.Marker().setLngLat(coordinates).addTo(map);
return () => {
marker.remove();
};
},
[coordinates]
);
return null;
};
const App = () => {
return (
<MapboxUI
accessToken={accessToken}
style={{
height: "100vh",
width: "100%",
}}
defaultCenter={centerCoorindates}
>
<Marker coordinates={centerCoorindates} />
</MapboxUI>
);
};
FAQs
> This was a fork of [`react-mapbox-ui`](https://github.com/eliashussary/react-mapbox-ui)
The npm package react-mapbox-ui receives a total of 29 weekly downloads. As such, react-mapbox-ui popularity was classified as not popular.
We found that react-mapbox-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.