728x90
// render() 부분 코드 일부
const inventoryListBySO = () => {
let result = [];
let numberForKey = 0;
pricePolicyStore.selectedInventoryList.length > 0 &&
// ... 생략
};
// return() 부분 코드 일부
// 처음에 inventoryListBySO 라고만 선언함
<GridItem xs={12} sm={10}>
<ol>
{inventoryListBySO()}
</ol>
</GridItem>
render() 부분에 함수를 선언하고, return 부분에서 이 함수를 실행을 안해줘서 생긴 버그다.
함수로 선언했으니까 당연히 실행을 해줘야 코드가 돌아가는데, 함수명만 선언해줘서 코드가 작동을 안했다.
참고한 사이트
반응형
'안녕 버그친구들' 카테고리의 다른 글
리액트 node_modules decorator 관련 오류 (0) | 2021.11.10 |
---|---|
스프링부트 JDBC Connection SQLException 오류 해결 (0) | 2021.11.08 |
Git 커밋취소 (0) | 2021.11.03 |
인텔리제이 cannot access org.springframework.context.configurableapplicationcontext 에러 해결 (0) | 2021.08.26 |
Visual Studio Code에 리액트 개발 환경 세팅하다가 난 오류 (환경변수) (0) | 2021.08.24 |
댓글