수정된 디자인시스템 컴포넌트 서비스 코드 반영 (Toggle) #794
Merged
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.
📄 Summary
기존코드 - 특정 훅에 의존적, 명령적인 로직 전개 필요, 불필요한 props drilling 빈번하게 발생.
아래처럼 토글 선택할때마다 useSelect불러와서 상태 값 및 핸들러 각 컴포넌트에 주입, 선택된 값에 따라 명령적으로 UI로직을 전개해야 했음.
아래와 같이 컴포넌트가 UI로직만 담을 수 있도록 리팩토링
#792