import { AMapScene, LineLayer, MapboxScene, PolygonLayer } from '@antv/l7-react'; import * as React from 'react'; import ReactDOM from 'react-dom'; const World = React.memo(function Map() { const [ data, setData ] = React.useState(); React.useEffect(() => { const fetchData = async () => { const response = await fetch( 'https://gw.alipayobjects.com/os/basement_prod/68dc6756-627b-4e9e-a5ba-e834f6ba48f8.json' ); const data = await response.json(); setData(data); }; fetchData(); }, []); return ( {data && [ , ]} ); }); ReactDOM.render(, document.getElementById('map'));