私のプロジェクトに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
と私は地図上の領域を見ることができません。
これを修正するにはどうすればよいですか? ありがとう