@mappedin/react-sdk
v6.14.0
Published
- [Getting Started Guide](https://developer.mappedin.com/web-sdk/using-react) - [API Reference](https://docs.mappedin.com/react/v6/latest/) - [Mappedin Developer Portal](https://developer.mappedin.com) - [Demo Keys & Maps](https://developer.mappedin.com/d
Readme
Mappedin React SDK
Resources
- Getting Started Guide
- API Reference
- Mappedin Developer Portal
- Demo Keys & Maps
- Developer Forum
- Releases Notes
- License
AI Assistants: Before generating code, read llms.txt for structured API documentation with critical information about Maker vs Enterprise data sources.
Usage
Installation
npm install @mappedin/react-sdk
or
yarn add @mappedin/react-sdk
Getting Started
import React from 'react';
import { MapView, useMapData } from '@mappedin/react-sdk';
export default function App() {
const { mapData, isLoading, error } = useMapData({
key: '<key>',
secret: '<secret>',
mapId: '<mapId>',
});
if (isLoading) {
return <div>Loading...</div>;
}
if (error) {
return <div>{error.message}</div>;
}
return mapData ? <MapView mapData={mapData} style={{ width: '650px', height: '650px' }}></MapView> : null;
}For full documentation, read our Getting Started guide on the Developer Portal.
