본문 바로가기

REACT/해결방안

(5)
[React]ComponentDidUpdate() 내에서 Setstate 를 사용하는 방법(무한루프 방지) 참조 : https://stackoverflow.com/questions/37937250/componentdidupdate-setstate-reactjs-infinite-loop ComponentDidUpdate SetState ReactJS Infinite loop Even though there are many questions with the same subject line, I could not get an answer for my problem. Problem I have a select dropdown. On click of which, I call an Api which fetches ... stackoverflow.com Setstate 를 사용할 때, 리렌더링됨과 더불어 Component..
Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead 참조 : https://stackoverflow.com/questions/47658765/objects-are-not-valid-as-a-react-child-found-object-promise/47659112 Objects are not valid as a React child (found: [object Promise]) I am trying to render a list of posts by mapping through an array. I've done this many times before but for some renderPosts = async () => { try { let res = await axios.get('/posts')... stackoverflow.com React에서 ax..
[React]ComponentDidMount() 에 Props 값이 제대로 안들어갈 때 Mobx 에서 정해준 기본값 0. 상위 컴포넌트에서 Geolocation API 로 props값 변경. 해당 컴포넌트에서 console.log(this.props) 했을 때는 변경된 props 값 출력이 되는데 this.props.mylat 을 출력하면 기본값인 0이 나온다. 해결방법 : ComponentDidMount() -> ComponentDidUpdate 로 바꾼다.
Cannot read property 'currentStyle' of null KAKAO MAP API 를 사용 도중 다음과 같은 문구가 떴다면, ->
[React]the tag abc is unrecognized in this browser Component의 첫번째 글자가 대문자이어야 합니다. abc >> Abc