반응형 Cannot read properties of null(reading 'currentStyle')1 kakaomap : Cannot read properties of null(reading 'currentStyle') 카카오지도 에러 : Cannot read properties of null(reading 'currentStyle') 카카오지도 공식문서에는 다음과 같이 가이드를 주고 있다. 이를 리액트로 변환시켜 다음과 같이 작성하였다. document로 id를 찾아 참조하지 않고 ref를 사용하였다. import { useRef } from 'react'; import styles from './mappage.module.scss'; const MapPage = () => { const mapRef = useRef(null); const container = mapRef.current; const options = { center: new window.kakao.maps.LatLng(37.17058840207, 12.. 2022. 11. 19. 이전 1 다음 반응형