Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
React 컴포넌트를 변경에 강하고 재사용 가능하게 설계하기 위한 컴포넌트 설계 지침 문서를 작성했습니다.
단일 책임 원칙을 기준으로 컴포넌트 경계를 나누는 방법을 정리하고, 복잡한 UI를 설계할 때 활용할 수 있는 Compound Components와 Headless UI 패턴을 문서화했습니다.
배경
컴포넌트가 커지거나 재사용 범위가 넓어질수록 아래와 같은 문제가 반복될 수 있습니다.
이 문제들에 대해 팀 차원의 컴포넌트 설계 기준을 세우기 위해 문서를 작성했습니다.
팀 논의 내용
children, render props, slot 선택 기준은 Props/인터페이스 문서에서 다루고, 상태 위치 판단은 상태 관리 문서에서 다루도록 경계를 명확히 했습니다.작성한 문서
docs/component-design/single-responsibility.mddocs/component-design/compound-components.mddocs/component-design/headless-ui.mddocs/component-design/index.md변경 파일
docs/component-design/single-responsibility.md(신규)docs/component-design/compound-components.md(신규)docs/component-design/headless-ui.md(신규)docs/component-design/index.md(지침 목록 및 토픽 범위 업데이트)docs/.vitepress/config.mts(컴포넌트 설계 사이드바 네비게이션 추가)참고 자료