[문제 발생]
Functions are not valid as a React child.
This may happen if you return a Component instead of <Component /> from render.
Or maybe you meant to call this function rather than return it.
return에 renderData라고 만든 함수를 함수명만 써서 오류가 발생하였다.
return(
<>
<h1>test</h1>
테스트 페이지
<div>{renderData}</div>
</>
);
[해결 과정]
{renderData} -> {renderData()}로 수정
return(
<>
<h1>test</h1>
테스트 페이지
<div>{renderData()}</div>
</>
);
'Error' 카테고리의 다른 글
오류(7) - 'Axios' is not defined no-undef (0) | 2022.04.04 |
---|---|
오류(6) - [MariaDB] 에러 해결- can't connect to mysql server on 'localhost' (0) | 2022.03.30 |
오류(5) Server Error - The selection cannot be run on any server. (0) | 2022.01.11 |
오류(4) This application has no explicit mapping for /error, so you are seeing this as a fallback. (2) | 2022.01.04 |
오류(3) spring boot pom.xml 첫 줄 에러 (0) | 2022.01.04 |
댓글