Installation and usage

What is the Dether React MAP?

Dether React Map is a React component that aims at showing the Dether map on any react app. It's only necessary to install the component and provide an infura url as props.

Installation

dether-react-map is a React library npm component

npm install --save dether-react-map

Usage

It's necessary to pass rpcURL as a props, it must be an infura URL such as: You can either choose kovan for testnet or mainnet.

You must give props to the component: width:

import React, { Component } from 'react'
import DetherReactMapfrom 'dether-react-map'
import 'dether-react-map/dist/index.css'
const rpcURL='https://kovan.infura.io/v3/xxxxxxxxxxxxxxxx'
class Example extends Component {
render() {
return <DetherReactMap width='100%' height='400px' rpcURL={rpcURL} />
}
}
DetherReactMap.propTypes = {
width: PropTypes.string, // CSS specific instruction
height: PropTypes.string, // CSS specific instruction
rpcURL: PropTypes.string.isRequired,
};

This is a link to an example showing the Dether React MAP in different sizes.