Skip to content

Commit 09cdb2d

Browse files
docs: translate apis.md, captureOwnerStack.md, addTransitionType.md (#1276)
# 내장 React API 번역 누락 항목 및 captureOwnerStack, addTranstionType 번역 작업 - 링크 : [내장 React API](https://ko.react.dev/reference/react/apis), [captureOwnerStack](https://ko.react.dev/reference/react/captureOwnerStack), [addTransitionType](https://ko.react.dev/reference/react/addTransitionType) - 이슈 : #1275 - 변경사항 미리보기 <img width="836" height="565" alt="image" src="https://github.com/user-attachments/assets/095d5a26-23f5-4332-b1c1-e0e2e6e8e972" /> <img width="851" height="668" alt="image" src="https://github.com/user-attachments/assets/e27726bb-697c-4f6b-a3f0-fa9173a2373a" /> <img width="830" height="740" alt="image" src="https://github.com/user-attachments/assets/aff6a3e1-e5f1-466c-93e4-cfe7342db1b5" /> ## 필수 확인 사항 - [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 fdf9108 commit 09cdb2d

File tree

3 files changed

+75
-71
lines changed

3 files changed

+75
-71
lines changed

src/content/reference/react/addTransitionType.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ version: experimental
55

66
<Experimental>
77

8-
**This API is experimental and is not available in a stable version of React yet.**
8+
**이 API는 실험적이며 React 안정 버전에서는 아직 사용할 수 없습니다.**
99

10-
You can try it by upgrading React packages to the most recent experimental version:
10+
이 API를 사용하려면 React 패키지를 가장 최신의 실험적인 버전으로 업그레이드해야 합니다.
1111

1212
- `react@experimental`
1313
- `react-dom@experimental`
1414
- `eslint-plugin-react-hooks@experimental`
1515

16-
Experimental versions of React may contain bugs. Don't use them in production.
16+
실험적인 버전의 React에는 버그가 있을 수 있습니다. 프로덕션 환경에서는 사용하지 마세요.
1717

1818
</Experimental>
1919

2020
<Intro>
2121

22-
`unstable_addTransitionType` lets you specify the cause of a transition.
22+
`unstable_addTransitionType`을 사용하면 트랜지션이 발생한 원인을 상세히 나타낼 수 있습니다.
2323

2424

2525
```js
@@ -35,30 +35,30 @@ startTransition(() => {
3535

3636
---
3737

38-
## Reference {/*reference*/}
38+
## 레퍼런스 {/*reference*/}
3939

4040
### `addTransitionType` {/*addtransitiontype*/}
4141

42-
#### Parameters {/*parameters*/}
42+
#### 매개변수 {/*parameters*/}
4343

44-
- `type`: The type of transition to add. This can be any string.
44+
- `type`: 추가할 트랜지션의 타입입니다. 어떤 문자열이든 될 수 있습니다.
4545

46-
#### Returns {/*returns*/}
46+
#### 반환값 {/*returns*/}
4747

48-
`startTransition` does not return anything.
48+
`startTransition`은 아무것도 반환하지 않습니다.
4949

50-
#### Caveats {/*caveats*/}
50+
#### 주의 사항 {/*caveats*/}
5151

52-
- If multiple transitions are combined, all Transition Types are collected. You can also add more than one type to a Transition.
53-
- Transition Types are reset after each commit. This means a `<Suspense>` fallback will associate the types after a `startTransition`, but revealing the content does not.
52+
- 여러 트랜지션이 결합되면 모든 트랜지션 타입이 수집됩니다. 하나의 트랜지션에 두 개 이상의 타입을 추가할 수도 있습니다.
53+
- 트랜지션 타입은 커밋마다 초기화됩니다. 즉, `<Suspense>`의 Fallback은 `startTransition` 이후 타입을 연결하며, 내용이 나타날 때는 그렇지 않습니다.
5454

5555
---
5656

57-
## Usage {/*usage*/}
57+
## 사용법 {/*usage*/}
5858

59-
### Adding the cause of a transition {/*adding-the-cause-of-a-transition*/}
59+
### 트랜지션의 원인 추가하기 {/*adding-the-cause-of-a-transition*/}
6060

61-
Call `addTransitionType` inside of `startTransition` to indicate the cause of a transition:
61+
트랜지션의 원인을 나타내기 위해 `startTransition` 내부에서 `addTransitionType`을 호출합니다
6262

6363
``` [[1, 6, "unstable_addTransitionType"], [2, 5, "startTransition", [3, 6, "'submit-click'"]]
6464
import { startTransition, unstable_addTransitionType } from 'react';
@@ -76,22 +76,22 @@ function Submit({action) {
7676
7777
```
7878

79-
When you call <CodeStep step={1}>addTransitionType</CodeStep> inside the scope of <CodeStep step={2}>startTransition</CodeStep>, React will associate <CodeStep step={3}>submit-click</CodeStep> as one of the causes for the Transition.
79+
<CodeStep step={1}>addTransitionType</CodeStep><CodeStep step={2}>startTransition</CodeStep>의 범위 내에서 호출하면, React는 해당 트랜지션에 <CodeStep step={3}>submit-click</CodeStep>을 원인으로 연결합니다.
8080

81-
Currently, Transition Types can be used to customize different animations based on what caused the Transition. You have three different ways to choose from for how to use them:
81+
현재 트랜지션 타입은 원인에 따라 서로 다른 애니메이션을 커스터마이즈하는 데 사용할 수 있습니다. 사용할 수 있는 방식은 세 가지입니다.
8282

83-
- [Customize animations using browser view transition types](#customize-animations-using-browser-view-transition-types)
84-
- [Customize animations using `View Transition` Class](#customize-animations-using-view-transition-class)
85-
- [Customize animations using `ViewTransition` events](#customize-animations-using-viewtransition-events)
83+
- [브라우저 View Transition 타입으로 애니메이션 커스텀하기](#customize-animations-using-browser-view-transition-types)
84+
- [`View Transition` 클래스로 애니메이션 커스텀하기](#customize-animations-using-view-transition-class)
85+
- [`ViewTransition`이벤트로 애니메이션 커스텀하기](#customize-animations-using-viewtransition-events)
8686

87-
In the future, we plan to support more use cases for using the cause of a transition.
87+
향후에는 트랜지션의 원인을 활용할 수 있는 다양한 용례를 지원할 예정입니다.
8888

8989
---
90-
### Customize animations using browser view transition types {/*customize-animations-using-browser-view-transition-types*/}
90+
### 브라우저 View Transition 타입으로 애니메이션 커스텀하기 {/*customize-animations-using-browser-view-transition-types*/}
9191

92-
When a [`ViewTransition`](/reference/react/ViewTransition) activates from a transition, React adds all the Transition Types as browser [view transition types](https://www.w3.org/TR/css-view-transitions-2/#active-view-transition-pseudo-examples) to the element.
92+
트랜지션에서 [`ViewTransition`](/reference/react/ViewTransition)이 활성화되면, React는 모든 트랜지션 타입을 브라우저의 [View Transition Types](https://www.w3.org/TR/css-view-transitions-2/#active-view-transition-pseudo-examples)으로 해당 요소에 추가합니다.
9393

94-
This allows you to customize different animations based on CSS scopes:
94+
이렇게 하면 CSS 범위에서 다른 애니메이션을 커스텀할 수 있습니다.
9595

9696
```js [11]
9797
function Component() {
@@ -118,9 +118,9 @@ startTransition(() => {
118118

119119
---
120120

121-
### Customize animations using `View Transition` Class {/*customize-animations-using-view-transition-class*/}
121+
### `View Transition` 클래스로 애니메이션 커스텀하기 {/*customize-animations-using-view-transition-class*/}
122122

123-
You can customize animations for an activated `ViewTransition` based on type by passing an object to the View Transition Class:
123+
활성화된 `ViewTransition`에서 타입에 따라 애니메이션을 커스터마이즈하려면, View Transition 클래스에 객체를 전달하면 됩니다.
124124

125125
```js
126126
function Component() {
@@ -140,9 +140,9 @@ startTransition(() => {
140140
});
141141
```
142142

143-
If multiple types match, then they're joined together. If no types match then the special "default" entry is used instead. If any type has the value "none" then that wins and the ViewTransition is disabled (not assigned a name).
143+
여러 타입이 매칭되면 값들이 결합됩니다. 매칭되는 타입이 없으면 "default" 엔트리가 사용됩니다. 어떤 타입이라도 값이 "none"이면 해당 값이 우선하며 `ViewTransition`은 비활성화됩니다. (이름이 할당되지 않습니다).
144144

145-
These can be combined with enter/exit/update/layout/share props to match based on kind of trigger and Transition Type.
145+
이 방식은 enter/exit/update/layout/share Props와 결합하여 트리거 종류와 트랜지션 타입에 따라 동작을 맞출 수 있습니다.
146146

147147
```js
148148
<ViewTransition enter={{
@@ -157,9 +157,9 @@ exit={{
157157

158158
---
159159

160-
### Customize animations using `ViewTransition` events {/*customize-animations-using-viewtransition-events*/}
160+
### `ViewTransition` 이벤트로 애니메이션 커스텀하기 {/*customize-animations-using-viewtransition-events*/}
161161

162-
You can imperatively customize animations for an activated `ViewTransition` based on type using View Transition events:
162+
View Transition 이벤트를 활용하여 타입에 따라 활성화된 `ViewTransition`의 애니메이션을 즉시 커스터마이즈할 수 있습니다.
163163

164164
```
165165
<ViewTransition onUpdate={(inst, types) => {
@@ -173,10 +173,10 @@ You can imperatively customize animations for an activated `ViewTransition` base
173173
}}>
174174
```
175175

176-
This allows you to pick different imperative Animations based on the cause.
176+
이렇게 하면 원인에 따라 서로 다른 애니메이션을 선택할 수 있습니다.
177177

178178
---
179179

180-
## Troubleshooting {/*troubleshooting*/}
180+
## 문제 해결 {/*troubleshooting*/}
181181

182-
### TODO {/*todo2*/}
182+
### 해야 할 일 {/*todo2*/}

src/content/reference/react/apis.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ title: "내장 React API"
77
[Hook](/reference/react/hooks)[컴포넌트](/reference/react/components) 외에도 `react` 패키지는 컴포넌트를 정의하는데 유용한 몇 가지 API를 가지고 있습니다. 이 페이지는 최신 React API를 모두 나열합니다.
88

99
</Intro>
10-
{/*React 영문 공식 문서에 반영되지 않은 내용 임의로 수정하여 반영하였습니다. `cahce``use`에 대한 내용 설명을 제외하고 수정하지 말아주세요*/}
10+
{/*React 영문 공식 문서에 반영되지 않은 내용 임의로 수정하여 반영하였습니다. `cache``use`에 대한 내용 설명을 제외하고 수정하지 말아주세요*/}
1111
---
12-
* [`act`](/reference/react/act) lets you wrap renders and interactions in tests to ensure updates have processed before making assertions.
12+
* [`act`](/reference/react/act)를 통해 테스트에서 렌더링이나 상호작용을 감싸서 관련된 업데이트가 모두 처리된 뒤에 검증합니다.
1313
* [`cache`](/reference/react/cache)를 통해 가져온 데이터나 연산의 결과를 캐싱합니다.
14-
* [`createContext`](/reference/react/createContext) lets you define and provide context to the child components. Used with [`useContext`.](/reference/react/useContext)
15-
* [`lazy`](/reference/react/lazy) lets you defer loading a component's code until it's rendered for the first time.
16-
* [`memo`](/reference/react/memo) lets your component skip re-renders with same props. Used with [`useMemo`](/reference/react/useMemo) and [`useCallback`.](/reference/react/useCallback)
17-
* [`startTransition`](/reference/react/startTransition) lets you mark a state update as non-urgent. Similar to [`useTransition`.](/reference/react/useTransition)
14+
* [`captureOwnerStack`](/reference/react/captureOwnerStack)을 통해 개발 환경에서 현재 Owner Stack을 읽고, 사용가능한 문자열을 반환합니다.
15+
* [`createContext`](/reference/react/createContext)를 통해 자식 컴포넌트들에게 전달할 수 있는 컨텍스트를 정의하고 제공합니다. 보통 [`useContext`](/reference/react/useContext)와 함께 사용합니다.
16+
* [`lazy`](/reference/react/lazy)를 통해 컴포넌트가 처음 렌더링될 때까지 해당 컴포넌트의 코드를 로딩하는 것을 지연합니다.
17+
* [`memo`](/reference/react/memo)를 통해 동일한 Props일 경우 컴포넌트가 다시 렌더링되지 않도록 최적화합니다. 주로 [`useMemo`](/reference/react/useMemo), [`useCallback`](/reference/react/useCallback)과 함께 사용합니다.
18+
* [`startTransition`](/reference/react/startTransition)을 통해 상태 업데이트를 "덜 긴급한 작업"으로 표시하여 UI의 반응성을 유지합니다. [`useTransition`](/reference/react/useTransition)과 유사합니다.
1819
* [`use`](/reference/react/use)는 Promise나 Context와 같은 데이터를 참조하는 React Hook입니다.
20+
* [`taintObjectReference`](/reference/react/experimental_taintObjectReference)를 통해 `user` 객체와 같은 특정한 객체 인스턴스를 클라이언트 컴포넌트로 전송하는 것을 방지합니다.
21+
* [`taintUniqueValue`](/reference/react/experimental_taintUniqueValue)를 통해 패스워드, 키 또는 토큰과 같은 고유 값을 클라이언트 컴포넌트로 전송하는 것을 방지합니다.
22+
* [`addTransitionType`](/reference/react/addTransitionType)를 통해, 트랜지션이 발생한 원인을 상세히 나타냅니다.
1923
---
2024

2125
## Resource APIs {/*resource-apis*/}

src/content/reference/react/captureOwnerStack.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: captureOwnerStack
44

55
<Intro>
66

7-
`captureOwnerStack` reads the current Owner Stack in development and returns it as a string if available.
7+
`captureOwnerStack`는 개발 환경에서 현재 Owner Stack을 읽고, 사용할 수 있다면 문자열 반환합니다.
88

99
```js
1010
const stack = captureOwnerStack();
@@ -16,11 +16,11 @@ const stack = captureOwnerStack();
1616

1717
---
1818

19-
## Reference {/*reference*/}
19+
## 레퍼런스 {/*reference*/}
2020

2121
### `captureOwnerStack()` {/*captureownerstack*/}
2222

23-
Call `captureOwnerStack` to get the current Owner Stack.
23+
`captureOwnerStack`을 호출하여 현재 Owner Stack을 가져옵니다.
2424

2525
```js {5,5}
2626
import * as React from 'react';
@@ -33,33 +33,33 @@ function Component() {
3333
}
3434
```
3535

36-
#### Parameters {/*parameters*/}
36+
#### 매개변수 {/*parameters*/}
3737

38-
`captureOwnerStack` does not take any parameters.
38+
`captureOwnerStack`는 매개변수를 받지 않습니다.
3939

40-
#### Returns {/*returns*/}
40+
#### 반환값 {/*returns*/}
4141

42-
`captureOwnerStack` returns `string | null`.
42+
`captureOwnerStack``string`이나 `null`을 반환합니다.
4343

44-
Owner Stacks are available in
45-
- Component render
46-
- Effects (e.g. `useEffect`)
47-
- React's event handlers (e.g. `<button onClick={...} />`)
48-
- React error handlers ([React Root options](/reference/react-dom/client/createRoot#parameters) `onCaughtError`, `onRecoverableError`, and `onUncaughtError`)
44+
Owner Stacks은 다음 경우에 사용할 수 있습니다.
45+
- 컴포넌트 렌더링 시
46+
- Effect (예: `useEffect`)
47+
- React 이벤트 핸들러 (예: `<button onClick={...} />`)
48+
- React 오류 핸들러 ([React 루트 옵션](/reference/react-dom/client/createRoot#parameters) `onCaughtError`, `onRecoverableError`, `onUncaughtError`)
4949

50-
If no Owner Stack is available, `null` is returned (see [Troubleshooting: The Owner Stack is `null`](#the-owner-stack-is-null)).
50+
Owner Stack을 사용할 수 없는 경우, `null`을 반환합니다. ([문제해결: Owner Stack이 `null`인 경우](#the-owner-stack-is-null))
5151

52-
#### Caveats {/*caveats*/}
52+
#### 주의 사항 {/*caveats*/}
5353

54-
- Owner Stacks are only available in development. `captureOwnerStack` will always return `null` outside of development.
54+
- Owner Stack은 개발 환경에서만 사용할 수 있습니다. `captureOwnerStack`은 개발 환경 밖에서는 항상 `null`을 반환합니다.
5555

5656
<DeepDive>
5757

5858
#### Owner Stack vs Component Stack {/*owner-stack-vs-component-stack*/}
5959

60-
The Owner Stack is different from the Component Stack available in React error handlers like [`errorInfo.componentStack` in `onUncaughtError`](/reference/react-dom/client/hydrateRoot#show-a-dialog-for-uncaught-errors).
60+
Owner Stack은 [`onUncaughtError` 내부의 `errorInfo.componentStack`](/reference/react-dom/client/hydrateRoot#show-a-dialog-for-uncaught-errors)과 같은 React 오류 핸들러에서 사용할 수 있는 컴포넌트 Stack과 다릅니다.
6161

62-
For example, consider the following code:
62+
예를 들어 다음 코드를 살펴보겠습니다.
6363

6464
<Sandpack>
6565

@@ -136,8 +136,8 @@ createRoot(document.createElement('div'), {
136136

137137
</Sandpack>
138138

139-
`SubComponent` would throw an error.
140-
The Component Stack of that error would be
139+
`SubComponent`에서 오류가 날 수 있습니다.
140+
해당 오류의 컴포넌트 Stack은 다음과 같을 것입니다.
141141

142142
```
143143
at SubComponent
@@ -148,23 +148,23 @@ at React.Suspense
148148
at App
149149
```
150150

151-
However, the Owner Stack would only read
151+
그러나, Owner Stack에는 다음 내용만 나타납니다.
152152

153153
```
154154
at Component
155155
```
156156

157-
Neither `App` nor the DOM components (e.g. `fieldset`) are considered Owners in this Stack since they didn't contribute to "creating" the node containing `SubComponent`. `App` and DOM components only forwarded the node. `App` just rendered the `children` node as opposed to `Component` which created a node containing `SubComponent` via `<SubComponent />`.
157+
`App`DOM 컴포넌트들(예: `fieldset`)`SubComponent`를 포함하는 노드를 "생성하는" 데에 기여하지 않기 때문 이 스택에 포함되지 않습니다. `App`DOM 컴포넌트들은 노드를 전달할 뿐입니다. `App``<SubComponent />`를 통해 `SubComponent`를 포함한 노드를 생성하는 `Component`와 달리 `children` 노드만 렌더링합니다.
158158

159-
Neither `Navigation` nor `legend` are in the stack at all since it's only a sibling to a node containing `<SubComponent />`.
159+
`Navigation``legend``<SubComponent />`를 포함하는 노드의 형제 요소이기 때문에 스택에 전혀 포함되지 않습니다.
160160

161-
`SubComponent` is omitted because it's already part of the callstack.
161+
`SubComponent`는 이미 호출 스택에 포함되어 있기 떄문에 Owner Stack에 나타나지 않습니다.
162162

163163
</DeepDive>
164164

165-
## Usage {/*usage*/}
165+
## 사용법 {/*usage*/}
166166

167-
### Enhance a custom error overlay {/*enhance-a-custom-error-overlay*/}
167+
### 커스텀 오류 오버레이 개선하기 {/*enhance-a-custom-error-overlay*/}
168168

169169
```js [[1, 5, "console.error"], [4, 7, "captureOwnerStack"]]
170170
import { captureOwnerStack } from "react";
@@ -183,7 +183,7 @@ console.error = function patchedConsoleError(...args) {
183183
};
184184
```
185185

186-
If you intercept <CodeStep step={1}>`console.error`</CodeStep> calls to highlight them in an error overlay, you can call <CodeStep step={2}>`captureOwnerStack`</CodeStep> to include the Owner Stack.
186+
<CodeStep step={1}>`console.error`</CodeStep> 호출을 가로채서 오류 오버레이에 표시하고 싶다면, <CodeStep step={2}>`captureOwnerStack`</CodeStep>을 호출하여 `OwnerStack`을 포함할 수 있습니다.
187187

188188
<Sandpack>
189189

@@ -347,13 +347,13 @@ export default function App() {
347347

348348
</Sandpack>
349349

350-
## Troubleshooting {/*troubleshooting*/}
350+
## 문제 해결 {/*troubleshooting*/}
351351

352-
### The Owner Stack is `null` {/*the-owner-stack-is-null*/}
352+
### Owner Stack이 `null`인 경우 {/*the-owner-stack-is-null*/}
353353

354-
The call of `captureOwnerStack` happened outside of a React controlled function e.g. in a `setTimeout` callback, after a `fetch` call or in a custom DOM event handler. During render, Effects, React event handlers, and React error handlers (e.g. `hydrateRoot#options.onCaughtError`) Owner Stacks should be available.
354+
`captureOwnerStack``setTimeout` 콜백과 같이 React가 제어하지 않는 함수 바깥에서 호출됐을 경우, `fetch` 호출 후, 커스텀 DOM 이벤트 핸들러 등에서는 Owner Stack이 `null`이 됩니다. 렌더링 중이나 Effect, React 이벤트 핸들러, React 오류 핸들러 (예: `hydrateRoot#options.onCaughtError`) 내에서만 생성됩니다.
355355

356-
In the example below, clicking the button will log an empty Owner Stack because `captureOwnerStack` was called during a custom DOM event handler. The Owner Stack must be captured earlier e.g. by moving the call of `captureOwnerStack` into the Effect body.
356+
아래 예시에서, 버튼을 클릭하면 빈 Owner Stack이 로그로 출력됩니다. 그 이유는 `captureOwnerStack`이 커스텀 이벤트 핸들러 내에서 호출되었기 때문입니다. Owner Stack은 더 이른 시점, 예를 들어 이펙트 내부에서 `captureOwnerStack`를 호출하도록 이동시켜야 올바르게 캡처할 수 있습니다.
357357
<Sandpack>
358358

359359
```js
@@ -381,9 +381,9 @@ export default function App() {
381381

382382
</Sandpack>
383383

384-
### `captureOwnerStack` is not available {/*captureownerstack-is-not-available*/}
384+
### `captureOwnerStack`을 사용할 수 없는 경우 {/*captureownerstack-is-not-available*/}
385385

386-
`captureOwnerStack` is only exported in development builds. It will be `undefined` in production builds. If `captureOwnerStack` is used in files that are bundled for production and development, you should conditionally access it from a namespace import.
386+
`captureOwnerStack`은 개발 환경 빌드에서만 Export됩니다. 프로덕션 환경 빌드에서는 `undefined`입니다. `captureOwnerStack`이 개발과 프로덕션이 모두 번들링되는 파일에서 사용될 때는 네임스페이스 `import`를 사용하고 조건부로 접근해야 합니다.
387387

388388
```js
389389
// Don't use named imports of `captureOwnerStack` in files that are bundled for development and production.

0 commit comments

Comments
 (0)