React에서 axios , cheerio 를 사용하여 크롤링을 연습하던 도중 생긴 문제.
Console 에는 원하는만큼 전부 찍히지만 Render() 안으로 값이 들어가기만 하면 바보가 되네요
this.renderPosts() will return a Promise not the actual data, and AFAIK Reactjs will not resolve Promises implicitly in render.
->
this.renderPosts()는 실제 데이터가 아닌 Promise를 반환하고, AFAIK Reactjs는 렌더에서 암묵적으로 Promises를 해결하지 않는다.
Promise 에 대해서 잘 알지 못해 생긴 문제였습니다.
'REACT > 해결방안' 카테고리의 다른 글
[React]ComponentDidUpdate() 내에서 Setstate 를 사용하는 방법(무한루프 방지) (0) | 2020.03.30 |
---|---|
[React]ComponentDidMount() 에 Props 값이 제대로 안들어갈 때 (0) | 2020.03.26 |
Cannot read property 'currentStyle' of null (0) | 2020.03.24 |
[React]the tag abc is unrecognized in this browser (0) | 2020.03.24 |