@@ -15,22 +15,13 @@ context를 이용하면 단계마다 일일이 props를 넘겨주지 않고도
15
15
- [ Context.Provider] ( #contextprovider )
16
16
- [ Class.contextType] ( #classcontexttype )
17
17
- [ Context.Consumer] ( #contextconsumer )
18
- <<<<<<< HEAD
18
+ - [ Context.displayName ] ( #contextdisplayname )
19
19
- [ 예시] ( #examples )
20
20
- [ 값이 변하는 context] ( #dynamic-context )
21
21
- [ 하위 컴포넌트에서 context 업데이트하기] ( #updating-context-from-a-nested-component )
22
22
- [ 여러 context 구독하기] ( #consuming-multiple-contexts )
23
23
- [ 주의사항] ( #caveats )
24
24
- [ 예전 API] ( #legacy-api )
25
- =======
26
- - [ Context.displayName] ( #contextdisplayname )
27
- - [ Examples] ( #examples )
28
- - [ Dynamic Context] ( #dynamic-context )
29
- - [ Updating Context from a Nested Component] ( #updating-context-from-a-nested-component )
30
- - [ Consuming Multiple Contexts] ( #consuming-multiple-contexts )
31
- - [ Caveats] ( #caveats )
32
- - [ Legacy API] ( #legacy-api )
33
- >>>>>>> 647b639259919f96e9b667bf41ec16621e1b84dc
34
25
35
26
## 언제 context를 써야 할까 {#when-to-use-context}
36
27
@@ -204,14 +195,11 @@ Context.Consumer의 자식은 [함수](/docs/render-props.html#using-props-other
204
195
>
205
196
> 함수를 자식으로 받는 패턴에 대해서는 [ render props] ( /docs/render-props.html ) 을 참조하세요.
206
197
207
- <<<<<<< HEAD
208
- ## 예시 {#examples}
209
- =======
210
198
### ` Context.displayName ` {#contextdisplayname}
211
199
212
- Context object accepts a ` displayName ` string property. React DevTools uses this string to determine what to display for the context .
200
+ Context 객체는 ` displayName ` 문자열 속성을 설정할 수 있습니다. React 개발자 도구는 이 문자열을 사용해서 context를 어떻게 보여줄 지 결정합니다 .
213
201
214
- For example, the following component will appear as MyDisplayName in the DevTools:
202
+ 예를 들어, 아래 컴포넌트는 개발자 도구에 MyDisplayName로 표시됩니다.
215
203
216
204
``` js{2}
217
205
const MyContext = React.createContext(/* some value */);
@@ -221,8 +209,7 @@ MyContext.displayName = 'MyDisplayName';
221
209
<MyContext.Consumer> // "MyDisplayName.Consumer" in DevTools
222
210
```
223
211
224
- ## Examples {#examples}
225
- >>>>>>> 647b639259919f96e9b667bf41ec16621e1b84dc
212
+ ## 예시 {#examples}
226
213
227
214
### 값이 변하는 context {#dynamic-context}
228
215
0 commit comments