You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/reference/react/addTransitionType.md
+35-37Lines changed: 35 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,22 +5,21 @@ version: experimental
5
5
6
6
<Experimental>
7
7
8
-
**This API is experimental and is not available in a stable version of React yet.**
8
+
**이 API는 실험적이며 React 안정 버전에서는 아직 사용할 수 없습니다.**
9
9
10
-
You can try it by upgrading React packages to the most recent experimental version:
10
+
이 API를 사용하려면 React 패키지를 가장 최신의 실험적인 버전으로 업그레이드해야 합니다.
11
11
12
12
-`react@experimental`
13
13
-`react-dom@experimental`
14
14
-`eslint-plugin-react-hooks@experimental`
15
15
16
-
Experimental versions of React may contain bugs. Don't use them in production.
16
+
실험적인 버전의 React에는 버그가 있을 수 있습니다. 프로덕션에서는 사용하지 마세요.
17
17
18
18
</Experimental>
19
19
20
20
<Intro>
21
21
22
-
`unstable_addTransitionType` lets you specify the cause of a transition.
23
-
22
+
`unstable_addTransitionType`를 사용하면 트랜지션이 발생한 원인을 상세히 나타낼 수 있습니다.
24
23
25
24
```js
26
25
startTransition(() => {
@@ -35,32 +34,32 @@ startTransition(() => {
35
34
36
35
---
37
36
38
-
## Reference {/*reference*/}
37
+
## 레퍼런스 {/*reference*/}
39
38
40
39
### `addTransitionType` {/*addtransitiontype*/}
41
40
42
-
#### Parameters {/*parameters*/}
41
+
#### 매개변수 {/*parameters*/}
43
42
44
-
-`type`: The type of transition to add. This can be any string.
43
+
-`type`: 추가할 트랜지션의 타입입니다. 어떤 문자열이든 될 수 있습니다.
45
44
46
-
#### Returns {/*returns*/}
45
+
#### 반환값 {/*returns*/}
47
46
48
-
`startTransition` does not return anything.
47
+
`startTransition`은 아무것도 반환하지 않습니다.
49
48
50
-
#### Caveats {/*caveats*/}
49
+
#### 주의 사항 {/*caveats*/}
51
50
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.
51
+
-여러 트랜지션이 결합되면 모든 트랜지션 타입이 수집됩니다. 하나의 트랜지션에 두 개 이상의 타입을 추가할 수도 있습니다.
52
+
-트랜지션 타입은 커밋마다 초기화됩니다. 즉, `<Suspense>`의 Fallback은 `startTransition` 이후 타입을 연결하며, 컨텐츠가 나타날 때는 그렇지 않습니다.
54
53
55
54
---
56
55
57
-
## Usage {/*usage*/}
56
+
## 사용법 {/*usage*/}
58
57
59
-
### Adding the cause of a transition {/*adding-the-cause-of-a-transition*/}
58
+
### 트랜지션의 원인 추가하기 {/*adding-the-cause-of-a-transition*/}
60
59
61
-
Call `addTransitionType` inside of `startTransition` to indicate the cause of a transition:
60
+
`startTransition` 내부에서 `addTransitionType`을 호출해 트랜지션의 원인을 나타냅니다.
import { startTransition, unstable_addTransitionType } from 'react';
65
64
66
65
function Submit({action) {
@@ -76,22 +75,21 @@ function Submit({action) {
76
75
77
76
```
78
77
79
-
When you call <CodeStepstep={1}>addTransitionType</CodeStep> inside the scope of <CodeStepstep={2}>startTransition</CodeStep>, React will associate <CodeStepstep={3}>submit-click</CodeStep> as one of the causes for the Transition.
80
-
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:
78
+
<CodeStepstep={1}>addTransitionType</CodeStep>을 <CodeStepstep={2}>startTransition</CodeStep>의 범위 내에서 호출하면, React는 해당 트랜지션에 <CodeStepstep={3}>submit-click</CodeStep>을 원인으로 연결합니다.
82
79
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)
80
+
현재 트랜지션 타입은 원인에 따라 서로 다른 애니메이션을 커스터마이즈하는 데 사용할 수 있습니다. 사용할 수 있는 방식은 세 가지입니다:
81
+
-[브라우저 view transition 타입으로 애니메이션 커스텀하기](#customize-animations-using-browser-view-transition-types)
82
+
-[`View Transition` 클래스로 애니메이션 커스텀하기](#customize-animations-using-view-transition-class)
83
+
-[`ViewTransition`이벤트로 애니메이션 커스텀하기](#customize-animations-using-viewtransition-events)
86
84
87
-
In the future, we plan to support more use cases for using the cause of a transition.
85
+
향후에는 트랜지션의 원인을 활용할 수 있는 다양한 용례를 지원할 예정입니다.
88
86
89
87
---
90
-
### Customize animations using browser view transition types {/*customize-animations-using-browser-view-transition-types*/}
88
+
### 브라우저 view transition 타입으로 애니메이션 커스텀하기 {/*customize-animations-using-browser-view-transition-types*/}
91
89
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.
90
+
트랜지션에서 [`ViewTransition`](/reference/react/ViewTransition)이 활성화되면, React는 모든 트랜지션 타입을 브라우저의 [view transition types](https://www.w3.org/TR/css-view-transitions-2/#active-view-transition-pseudo-examples)으로 해당 요소에 추가합니다.
93
91
94
-
This allows you to customize different animations based on CSS scopes:
92
+
이렇게 하면 CSS 범위에서 다른 애니메이션을 커스텀할 수 있습니다.
95
93
96
94
```js [11]
97
95
functionComponent() {
@@ -118,9 +116,10 @@ startTransition(() => {
118
116
119
117
---
120
118
121
-
### Customize animations using `View Transition` Class {/*customize-animations-using-view-transition-class*/}
119
+
### `View Transition` 클래스로 애니메이션 커스텀하기 {/*customize-animations-using-view-transition-class*/}
120
+
121
+
활성화된 ViewTransition에서 타입에 따라 애니메이션을 커스터마이즈하려면, View Transition 클래스에 객체를 전달하면 됩니다.
122
122
123
-
You can customize animations for an activated `ViewTransition` based on type by passing an object to the View Transition Class:
124
123
125
124
```js
126
125
functionComponent() {
@@ -140,9 +139,9 @@ startTransition(() => {
140
139
});
141
140
```
142
141
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).
142
+
여러 타입이 매칭되면 값들이 결합되고, 매칭되는 타입이 없으면 "default" 엔트리가 사용됩니다. 만약 값이 "none"이면 ViewTransition이 비활성화되어 이름이 할당되지 않습니다.
144
143
145
-
These can be combined with enter/exit/update/layout/share props to match based on kind of trigger and Transition Type.
144
+
이 방식은 enter/exit/update/layout/share props와 결합하여 트리거 종류와 트랜지션 타입에 따라 동작을 맞출 수 있습니다.
146
145
147
146
```js
148
147
<ViewTransition enter={{
@@ -157,9 +156,9 @@ exit={{
157
156
158
157
---
159
158
160
-
### Customize animations using `ViewTransition` events {/*customize-animations-using-viewtransition-events*/}
159
+
### `ViewTransition`이벤트로 애니메이션 커스텀하기 {/*customize-animations-using-viewtransition-events*/}
161
160
162
-
You can imperatively customize animations for an activated `ViewTransition` based on type using View Transition events:
161
+
View Transition 이벤트를 활용하여 타입에 따라 활성화된 `ViewTransition`의 애니메이션을 즉시 커스터마이즈할 수 있습니다.
163
162
164
163
```
165
164
<ViewTransition onUpdate={(inst, types) => {
@@ -172,11 +171,10 @@ You can imperatively customize animations for an activated `ViewTransition` base
172
171
}
173
172
}}>
174
173
```
175
-
176
-
This allows you to pick different imperative Animations based on the cause.
0 commit comments