@mappedin/react-sdk
TypeScript icon, indicating that this package has built-in type declarations

6.0.1-beta.2 • Public • Published

Mappedin React SDK

Resources

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';
import '@mappedin/react-sdk/lib/esm/index.css';

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @mappedin/react-sdk

Weekly Downloads

438

Version

6.0.1-beta.2

License

SEE LICENSE IN LICENSE.txt

Unpacked Size

5.18 MB

Total Files

18

Last publish

Collaborators

  • mappedin-ops
  • mappedin-engineering