You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DB에서 category 받아왔을 때 이 카테고리를 CategorySelectBar에 주입하고 싶었다.
setSelectCategory(category) 로 하려고 했지만 이렇게 하면 무한 rerendering 이 일어난다.
let 을 사용해서 fetch가 끝나기 전까진 selectedCategory에 설정된 기본 값 ( ' ' ) 를 통해 categorySelectBar를 rendering하고 이후 fetching 이 끝나면 fetching한 category를 사용해서 렌더링 하는 의미로 위와 같이 작성했다.
let을 사용하지 않게 / 더 좋은 방법으로 refectoring하자
The text was updated successfully, but these errors were encountered:
구현할 내용
refectoring
The text was updated successfully, but these errors were encountered: