좌표에 초기값이 없을 때 나는 에러
아래 와 같이 구현 해야함
const [coordinate, setCoordinate] = useState({ latitude: 0, longitude: 0, latitudeDelta: 0.01, longitudeDelta: 0.01, });
setCoordinate({
latitude: data.latitude,
longitude: data.longitude,
latitudeDelta: 0.01,
longitudeDelta: 0.01,
});
coordinate={coordinate}
반응형
'코딩오류모음' 카테고리의 다른 글
INSTALL_FAILED_UPDATE_INCOMPATIBLE (0) | 2023.01.14 |
---|---|
FUNCTION ebdb.nextval does not exist. (0) | 2023.01.08 |
[ReactNative] Text strings must be rendered within a <Text> component. (0) | 2022.12.24 |
[React Native] react-native-snap-carousel ViewPropTypes 에러 (0) | 2022.12.24 |
Error using newLatLngBounds(LatLngBounds, int): Map size can't be 0. using react-native-maps on Android (0) | 2022.12.24 |