Skip to content

Commit f365450

Browse files
docs: usage, imperative에 대한 용어집 추가 (#1448)
<!-- PR을 보내주셔서 감사합니다! 여러분과 같은 기여자들이 React를 더욱 멋지게 만듭니다! 기존 이슈와 관련된 PR이라면, 아래에 이슈 번호를 추가해주세요. --> # <!-- 제목을 작성해주세요. --> close #1425 <!-- 어떤 종류의 PR인지 상세 내용을 작성해주세요. --> usage, transition, imperative에 대한 용어집 추가 usage는 제목에 올 수 있는 만큼 대소문자 구분을 하지 않고 transition은 명사인 만큼 s 역시도 검사합니다. ## 필수 확인 사항 - [x] [기여자 행동 강령 규약<sup>Code of Conduct</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md) - [x] [기여 가이드라인<sup>Contributing</sup>](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md) - [x] [공통 스타일 가이드<sup>Universal Style Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md) - [x] [번역을 위한 모범 사례<sup>Best Practices for Translation</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md) - [x] [번역 용어 정리<sup>Translate Glossary</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md) - [x] [`textlint` 가이드<sup>Textlint Guide</sup>](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md) - [x] [맞춤법 검사<sup>Spelling Check</sup>](https://nara-speller.co.kr/speller/) ## 선택 확인 사항 - [ ] 번역 초안 작성<sup>Draft Translation</sup> - [ ] 리뷰 반영<sup>Resolve Reviews</sup> --------- Co-authored-by: 루밀LuMir <rpfos@naver.com>
1 parent cb7f54d commit f365450

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

src/content/reference/react/useImperativeHandle.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ input {
170170
171171
---
172172
173-
### 사용자 정의 Imperative 메서드 노출 {/*exposing-your-own-imperative-methods*/}
173+
### 사용자 정의 명령형 메서드 노출 {/*exposing-your-own-imperative-methods*/}
174174
175-
Imperative Handle을 통해 노출하는 메서드는 DOM 메서드와 정확하게 일치할 필요가 없습니다. 예를 들어, 이 `Post` 컴포넌트는 Imperative Handle을 통해 `scrollAndFocusAddComment` 메서드를 표시합니다. 이렇게 하면 부모 `Page`에서 버튼을 클릭할 때 댓글 목록을 스크롤하고 입력 필드에 초점을 맞출 수 있습니다.
175+
명령형 핸들<sup>Imperative Handle</sup>을 통해 노출하는 메서드는 DOM 메서드와 정확하게 일치할 필요가 없습니다. 예를 들어, 이 `Post` 컴포넌트는 명령형 핸들을 통해 `scrollAndFocusAddComment` 메서드를 표시합니다. 이렇게 하면 부모 `Page`에서 버튼을 클릭할 때 댓글 목록을 스크롤하고 입력 필드에 초점을 맞출 수 있습니다.
176176
177177
<Sandpack>
178178
@@ -287,5 +287,5 @@ export default AddComment;
287287
288288
**Ref를 과도하게 사용하지 마세요.** Ref는 Props로 표현할 수 없는 필수적인 행동에만 사용해야 합니다. 예를 들어 특정 노드로 스크롤 하기, 노드에 초점 맞추기, 애니메이션 실행하기, 텍스트 선택하기 등이 있습니다.
289289
290-
**Prop으로 표현할 수 있는 것에 Ref를 사용하지 마세요.** 예를 들어 `Modal` 컴포넌트에서 `{ open, close }`와 같은 Imperative Handle을 노출하는 대신 `<Modal isOpen={isOpen} />`과 같은 `isOpen` Prop을 사용하는 것이 더 좋습니다. [Effect](/learn/synchronizing-with-effects)를 사용하면 Prop을 통해 명령형 동작<sup>Imperative Behavior</sup>을 노출할 수 있습니다.
290+
**Prop으로 표현할 수 있는 것에 Ref를 사용하지 마세요.** 예를 들어 `Modal` 컴포넌트에서 `{ open, close }`와 같은 명령형 핸들<sup>Imperative Handle</sup>을 노출하는 대신 `<Modal isOpen={isOpen} />`과 같은 `isOpen` Prop을 사용하는 것이 더 좋습니다. [Effect](/learn/synchronizing-with-effects)를 사용하면 Prop을 통해 명령형 동작<sup>Imperative Behavior</sup>을 노출할 수 있습니다.
291291
</Pitfall>

textlint/data/rules/translateGlossary.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,24 @@ module.exports = {
603603
note: '',
604604
},
605605
},
606+
{
607+
sources: [/\bUsage\b/],
608+
target: '사용법',
609+
meta: {
610+
term: 'Usage',
611+
discussions: [1425],
612+
note: '',
613+
},
614+
},
615+
{
616+
sources: [/\bImperative\b/],
617+
target: '명령형',
618+
meta: {
619+
term: 'Imperative',
620+
discussions: [1425],
621+
note: '',
622+
},
623+
},
606624
],
607625
},
608626
// untranslated: {

wiki/translate-glossary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,6 @@ Caveats|`/\bCaveats?\b/`, `/주의사항/`|주의 사항|[#1095](https://github.
7979
Logic|`/\bLogic\b/`|로직|[#695](https://github.com/reactjs/ko.react.dev/issues/695)||
8080
Dependency|`/\bDependenc(?:y\|ies)\b/`|의존성|[#841](https://github.com/reactjs/ko.react.dev/issues/841)||
8181
Directive|`/\bDirectives?\b/`|지시어|[#819](https://github.com/reactjs/ko.react.dev/issues/819)||
82+
Usage|`/\bUsage\b/`|사용법|[#1425](https://github.com/reactjs/ko.react.dev/issues/1425)||
83+
Imperative|`/\bImperative\b/`|명령형|[#1425](https://github.com/reactjs/ko.react.dev/issues/1425)||
8284

0 commit comments

Comments
 (0)