내 프로젝트에 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
나는지도에 지역을 볼 수 없습니다.
어떻게 해결할 수 있습니까? 감사합니다. .