import React, { Component } from 'react'; import { Map, TileLayer, Marker, Popup } from 'react-leaflet'; import { connect } from 'react-redux' const mapStateToProps = state => ({ positions: state.positions }); class MainMap extends Component { state = { lat: 0, lng: 0, zoom: 3, } render() { const position = [this.state.lat, this.state.lng] const markers = this.props.positions.map(position => A pretty CSS3 popup.
Easily customizable.
); return ( {markers} ) } } export default connect(mapStateToProps)(MainMap);