npm / react-simple-maps
react-simple-maps
What changed in react-simple-maps 3 to 5, from its official release notes, upgrade guides and advisories. Also covers @types/react-simple-maps. Sources checked 2026-11-30.
6 breaking8 new APIs and options1 tooling8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreact-simple-maps 517 changes
Breaking changes 6
TypeScript now requires coordinates to be tuples such as [number, number], rather than number[].
Markers and annotations render nothing when the projection returns null instead of throwing, so filtering data to avoid the crash is no longer necessary.
prop-types is no longer a peer dependency and has been replaced with TypeScript support; projects that do not otherwise use it can uninstall it.
The style prop on Geography and Marker is now a plain React style object; the keyed default, hover, and pressed form no longer applies interaction styles.
Calling the hook outside a MapProvider now throws immediately instead of returning undefined.
Calling the hook outside a ZoomPanProvider now throws instead of returning undefined.
New APIs and options 3
A core-only subpath export lets developers import ComposableMap without zoom/pan dependencies.
A zoom/pan-only subpath export lets developers import ZoomableGroup separately.
A new import subpath exposes ZoomableGroup and useZoomPan.
Tooling 1
The package now bundles its own TypeScript types and exports prop types for direct use, so projects can remove @types/react-simple-maps.
Fixes and other changes 7
ComposableMap no longer renders width and height as SVG attributes; it sets only the viewBox and projection translation, restoring responsive maps.
Moved from devDependencies to regular dependencies so public type definitions resolve correctly in consuming projects.
Bugfixes were made for Annotation.
Bugfixes were made for Marker.
The public API now has full type coverage, allowing developers to use TypeScript types across the API.
Bugfixes were made for useGeographies.
Bugfixes were made for useZoomPan.
react-simple-maps 36 changes
New APIs and options 5
Mapping components now support forwardRef.
Added the useMapContext hook.
Added the useZoomPanContext hook.
Added ZoomPanContext.
Added ZoomPanProvider.
Fixes and other changes 1
Added support for React 18.