Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
결과물
이전에 실험했던 기능에서 가은님이 피그마에 작성해줬던 형태로 다시 생성해봤습니다. 거지같은 css 는 덤
코드 설명
FSD구조를 생각해서 컴포넌트를 만들 때PhotoApp이란 하나의 컴포넌트에서 커스텀훅으로 도메인 로직을 불러오고entities에 존재하는 컴포넌트들에게props형태로 필요한 로직을 주입하는 형태로 컴포넌트를 생성해봤습니다.이야기 나눠보고 싶은 것들
조건부 렌더링
조건부 렌더링에 대해서 안좋은 편견을 가지고 있었는데 너무 남발하지만 않으면 나쁘지 않은 거 같기도 합니다.
isCaptured상태 값에 따라서 버튼을 다르게 렌더링 하는데 저 부분을 원래 조건부 렌더링을 하는 하나의 컴포넌트로 사용할까 ? 도 고민했었습니다.그런데 그렇게 하다보니 가독성은 좋아지는데
PhotoApp컴포넌트 자체의 반환값이 코드만 보고 이해하기는 좀 어렵더라고요