我该如何使用从父母那里获取的useeffect地理值来重新呈现它?
import React from 'react'
import { compose } from 'recompose'
import { withGoogleMap, GoogleMap as ReactGoogleMap } from 'react-google-maps'
import Marker from './Marker'
const GoogleMap = compose(withGoogleMap)(({ geo }) => {
console.log(geo)
return (
<ReactGoogleMap
center={{ lat: geo.latitude, lng: geo.longitude }}
options={{
streetViewControl: false,
fullscreenControl: false,
gestureHandling: 'cooperative',
zoom: 18,
}}
>
<Marker loc={geo} />
</ReactGoogleMap>
)
})
export default GoogleMap