Mobx 에서 정해준 기본값 0. 상위 컴포넌트에서 Geolocation API 로 props값 변경.
해당 컴포넌트에서 console.log(this.props) 했을 때는 변경된 props 값 출력이 되는데
this.props.mylat 을 출력하면 기본값인 0이 나온다.
해결방법 : ComponentDidMount() -> ComponentDidUpdate 로 바꾼다.
Mobx 에서 정해준 기본값 0. 상위 컴포넌트에서 Geolocation API 로 props값 변경.
해당 컴포넌트에서 console.log(this.props) 했을 때는 변경된 props 값 출력이 되는데
this.props.mylat 을 출력하면 기본값인 0이 나온다.
해결방법 : ComponentDidMount() -> ComponentDidUpdate 로 바꾼다.