2016-08-12 7 views
2

반응 전단지를 사용 중이며 시장이 나타날 수 있습니다. 그냥 작동하지 않습니다.반응 전단 팝업이 작동하지 않습니다. 커서가 마우스 오버시 변경되지 않습니다.

예제 코드를 복사했습니다. 다른 패키지와 충돌이있을 수 있습니까? 또는이 기능을 사용하려면 특정 버전의 전단지, 반응물 및 반응물이 필요합니까?

내 마우스 커서를 올리면 커서가 바뀌지 않습니다.

맵과 마커가 올바르게 렌더링되도록 올바른 CSS가 있는지 확인했습니다.

모든 도움을 주시면 감사하겠습니다. 매우 신나는 부분이므로 바보 같은 오류 일 수 있습니다.

import React from 'react'; 
import ReactDOM from 'react-dom'; 

import { Map, TileLayer, Marker, Popup } from 'react-leaflet'; 

class SimpleExample extends React.Component { 
    constructor() { 
    super(); 
    this.state = { 
     lat: 51.505, 
     lng: -0.09, 
     zoom: 13, 
    }; 
    } 

    render() { 
    const position = [this.state.lat, this.state.lng] 
    return (
     <Map center={position} zoom={this.state.zoom}> 
     <TileLayer 
      attribution='&copy <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' 
      url='http://{s}.tile.osm.org/{z}/{x}/{y}.png' 
     /> 
     <Marker position={position}> 
      <Popup> 
      <span>A CSS3 popup. <br /> Easily customizable.</span> 
      </Popup> 
     </Marker> 
     </Map> 
    ); 
    } 
} 

ReactDOM.render(<SimpleExample />, document.getElementById('root')); 

답변