본문 바로가기

전체 글

(16)
Git에 Node_modules 는 앞으로 넣지 말자 아무것도 모르고 -f 옵션 줘서 괜히 전부다 넣었다가 몇분째 기다리는지 모르겠다. package.json 파일 덕분에 npm install 이 정상적으로 된다고 한다. gitignore에 추가하여 빼고 넣자
[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..
[React] React-route 간단정리 1. 설치 npm install --save react-route-dom 혹은 yarn add react-route-dom 2. import import { BrowserRouter as Router, Route } from 'react-router-dom'; 3. 사용
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 에서 axios 로 API 요청중 생긴 오류 처음에 Request 로 프론트엔드 단에서 네이버 실검 크롤링을 해보려고 했는데 막힘. -> 기존에 Node.js Express 로 만들어놨던 사이트에서 Restful API 작성 그런데 React 에서 axios 로 API 요청하니 생긴 문제 해결방안 - Chrome 확장앱 Access-control-Allow-origin 받아서 설치. (임시로 한거이므로 수정 예정)
[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