2017-09-28 17 views
1

내 프로젝트에 react-leaflet을 통합했습니다. create-react-app 스크립트로 만듭니다. 나는이 example을 따른다.잡히지 않은 오류 : 요소 유형이 유효하지 않습니다. 문자열 응답 리플릿

모든 작동하지만, 내가 사용하려고 할 때 같이 GeoJson 구성 요소는 수입 : 나는 다음과 같은 경고가

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

.

warning.js:35 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check your code at index.js:47.

및 오류

Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of Leaflet

나는지도에 지역을 볼 수 없습니다.

어떻게 해결할 수 있습니까? 감사합니다. .

답변

1

반응 전단지 최근 변경 내용에 따르면 GeoJson 대신 GeoJSON을 가져와야합니다. 최근 전단지 라이브러리 변경 사항과 일치하도록 변경되었습니다.