Skip to content

Commit d510bb5

Browse files
authored
Merge branch 'master' into translate-tutorial-nav
2 parents f9135cf + 6823502 commit d510bb5

10 files changed

+166
-171
lines changed

content/docs/context.md

+69-72
Large diffs are not rendered by default.

content/docs/nav.yml

+66-66
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,85 @@
1-
- title: Installation
1+
- title: 설치
22
items:
33
- id: getting-started
4-
title: Getting Started
4+
title: 시작하기
55
- id: add-react-to-a-website
6-
title: Add React to a Website
6+
title: 웹 사이트에 React 추가하기
77
- id: create-a-new-react-app
8-
title: Create a New React App
8+
title: 새로운 React 앱 만들기
99
- id: cdn-links
10-
title: CDN Links
11-
- title: Main Concepts
10+
title: CDN 링크
11+
- title: 주요 개념
1212
isOrdered: true
1313
items:
1414
- id: hello-world
1515
title: Hello World
1616
- id: introducing-jsx
17-
title: Introducing JSX
17+
title: JSX 소개
1818
- id: rendering-elements
19-
title: Rendering Elements
19+
title: 엘리먼트 렌더링
2020
- id: components-and-props
21-
title: Components and Props
21+
title: Component와 Props
2222
- id: state-and-lifecycle
23-
title: State and Lifecycle
23+
title: State와 생명주기
2424
- id: handling-events
25-
title: Handling Events
25+
title: 이벤트 처리하기
2626
- id: conditional-rendering
27-
title: Conditional Rendering
27+
title: 조건부 렌더링
2828
- id: lists-and-keys
29-
title: Lists and Keys
29+
title: 리스트와 Key
3030
- id: forms
31-
title: Forms
31+
title:
3232
- id: lifting-state-up
33-
title: Lifting State Up
33+
title: State 올리기
3434
- id: composition-vs-inheritance
35-
title: Composition vs Inheritance
35+
title: 합성 vs 상속
3636
- id: thinking-in-react
37-
title: Thinking In React
38-
- title: Advanced Guides
37+
title: React로 생각하기
38+
- title: 고급 안내서
3939
items:
4040
- id: accessibility
41-
title: Accessibility
41+
title: 접근성
4242
- id: code-splitting
43-
title: Code-Splitting
43+
title: 코드 분할
4444
- id: context
4545
title: Context
4646
- id: error-boundaries
47-
title: Error Boundaries
47+
title: Error Boundary
4848
- id: forwarding-refs
49-
title: Forwarding Refs
49+
title: Ref 전달하기
5050
- id: fragments
51-
title: Fragments
51+
title: Fragment
5252
- id: higher-order-components
53-
title: Higher-Order Components
53+
title: 고차 컴포넌트
5454
- id: integrating-with-other-libraries
55-
title: Integrating with Other Libraries
55+
title: 다른 라이브러리와 통합하기
5656
- id: jsx-in-depth
57-
title: JSX In Depth
57+
title: JSX 이해하기
5858
- id: optimizing-performance
59-
title: Optimizing Performance
59+
title: 성능 최적화
6060
- id: portals
61-
title: Portals
61+
title: Portal
6262
- id: react-without-es6
63-
title: React Without ES6
63+
title: ES6 없이 사용하는 React
6464
- id: react-without-jsx
65-
title: React Without JSX
65+
title: JSX 없이 사용하는 React
6666
- id: reconciliation
67-
title: Reconciliation
67+
title: 재조정 (Reconciliation)
6868
- id: refs-and-the-dom
69-
title: Refs and the DOM
69+
title: Ref와 DOM
7070
- id: render-props
7171
title: Render Props
7272
- id: static-type-checking
73-
title: Static Type Checking
73+
title: 정적 타입 검사
7474
- id: strict-mode
7575
title: Strict Mode
7676
- id: typechecking-with-proptypes
77-
title: Typechecking With PropTypes
77+
title: PropTypes를 사용한 타입 검사
7878
- id: uncontrolled-components
79-
title: Uncontrolled Components
79+
title: 비제어 컴포넌트
8080
- id: web-components
81-
title: Web Components
82-
- title: API Reference
81+
title: 웹 컴포넌트
82+
- title: API 참고서
8383
items:
8484
- id: react-api
8585
title: React
@@ -91,63 +91,63 @@
9191
- id: react-dom-server
9292
title: ReactDOMServer
9393
- id: dom-elements
94-
title: DOM Elements
94+
title: DOM 엘리먼트
9595
- id: events
96-
title: SyntheticEvent
96+
title: 합성 이벤트
9797
- id: test-utils
98-
title: Test Utilities
98+
title: 테스트 유틸리티
9999
- id: shallow-renderer
100-
title: Shallow Renderer
100+
title: 얕은 렌더러
101101
- id: test-renderer
102-
title: Test Renderer
102+
title: 테스트 렌더러
103103
- id: javascript-environment-requirements
104-
title: JS Environment Requirements
104+
title: JS 환경 요구사항
105105
- id: glossary
106-
title: Glossary
107-
- title: Hooks (New)
106+
title: React 기술 용어 모음
107+
- title: Hook (New)
108108
isOrdered: true
109109
items:
110110
- id: hooks-intro
111-
title: Introducing Hooks
111+
title: Hook 소개
112112
- id: hooks-overview
113113
title: Hook 개요
114114
- id: hooks-state
115-
title: Using the State Hook
115+
title: State Hook 사용하기
116116
- id: hooks-effect
117-
title: Using the Effect Hook
117+
title: Effect Hook 사용하기
118118
- id: hooks-rules
119-
title: Hook의 규칙
119+
title: Hook 규칙
120120
- id: hooks-custom
121-
title: Building Your Own Hooks
121+
title: 자신만의 Hook 만들기
122122
- id: hooks-reference
123-
title: Hooks API Reference
123+
title: Hook API 참고서
124124
- id: hooks-faq
125-
title: Hooks FAQ
126-
- title: Contributing
125+
title: Hook 자주 묻는 질문
126+
- title: 기여
127127
items:
128128
- id: how-to-contribute
129-
title: How to Contribute
129+
title: 기여하는 방법
130130
- id: codebase-overview
131-
title: Codebase Overview
131+
title: 코드 구조 개요
132132
- id: implementation-notes
133-
title: Implementation Notes
133+
title: 구현 참고사항
134134
- id: design-principles
135-
title: Design Principles
136-
- title: FAQ
135+
title: 설계 원칙
136+
- title: 자주 묻는 질문
137137
items:
138138
- id: faq-ajax
139-
title: AJAX and APIs
139+
title: AJAX와 API
140140
- id: faq-build
141-
title: Babel, JSX, and Build Steps
141+
title: Babel, JSX와 Build 과정
142142
- id: faq-functions
143-
title: Passing Functions to Components
143+
title: 컴포넌트에 함수 전달하기
144144
- id: faq-state
145-
title: Component State
145+
title: 컴포넌트 State
146146
- id: faq-styling
147-
title: Styling and CSS
147+
title: 스타일링과 CSS
148148
- id: faq-structure
149-
title: File Structure
149+
title: 파일 구조
150150
- id: faq-versioning
151-
title: Versioning Policy
151+
title: 버전 정책
152152
- id: faq-internals
153-
title: Virtual DOM and Internals
153+
title: 가상 DOM과 구현 세부사항

examples/context/motivation-problem.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ class App extends React.Component {
66

77
function Toolbar(props) {
88
// highlight-range{1-4,7}
9-
// The Toolbar component must take an extra "theme" prop
10-
// and pass it to the ThemedButton. This can become painful
11-
// if every single button in the app needs to know the theme
12-
// because it would have to be passed through all components.
9+
// Toolbar 컴포넌트는 불필요한 테마 prop를 받아서
10+
// ThemeButton에 전달해야 합니다.
11+
// 앱 안의 모든 버튼이 테마를 알아야 한다면
12+
// 이 정보를 일일이 넘기는 과정은 매우 곤혹스러울 수 있습니다.
1313
return (
1414
<div>
1515
<ThemedButton theme={props.theme} />

examples/context/motivation-solution.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// highlight-range{1-4}
2-
// Context lets us pass a value deep into the component tree
3-
// without explicitly threading it through every component.
4-
// Create a context for the current theme (with "light" as the default).
2+
// context를 사용하면 모든 컴포넌트를 일일이 통하지 않고도
3+
// 원하는 값을 컴포넌트 트리 깊숙한 곳까지 보낼 수 있습니다.
4+
// light를 기본값으로 하는 테마 context를 만들어 봅시다.
55
const ThemeContext = React.createContext('light');
66

77
class App extends React.Component {
88
render() {
99
// highlight-range{1-3,5}
10-
// Use a Provider to pass the current theme to the tree below.
11-
// Any component can read it, no matter how deep it is.
12-
// In this example, we're passing "dark" as the current value.
10+
// Provider를 이용해 하위 트리에 테마 값을 보내줍니다.
11+
// 아무리 깊숙히 있어도, 모든 컴포넌트가 이 값을 읽을 수 있습니다.
12+
// 아래 예시에서는 dark를 현재 선택된 테마 값으로 보내고 있습니다.
1313
return (
1414
<ThemeContext.Provider value="dark">
1515
<Toolbar />
@@ -18,9 +18,8 @@ class App extends React.Component {
1818
}
1919
}
2020

21-
// highlight-range{1,2}
22-
// A component in the middle doesn't have to
23-
// pass the theme down explicitly anymore.
21+
// highlight-next-line
22+
// 이젠 중간에 있는 컴포넌트가 일일이 테마를 넘겨줄 필요가 없습니다.
2423
function Toolbar(props) {
2524
return (
2625
<div>
@@ -31,9 +30,9 @@ function Toolbar(props) {
3130

3231
class ThemedButton extends React.Component {
3332
// highlight-range{1-3,6}
34-
// Assign a contextType to read the current theme context.
35-
// React will find the closest theme Provider above and use its value.
36-
// In this example, the current theme is "dark".
33+
// 현재 선택된 테마 값을 읽기 위해 contextType을 지정합니다.
34+
// React는 가장 가까이 있는 테마 Provider를 찾아 그 값을 사용할 것입니다.
35+
// 이 예시에서 현재 선택된 테마는 dark입니다.
3736
static contextType = ThemeContext;
3837
render() {
3938
return <Button theme={this.context} />;

examples/context/multiple-contexts.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// Theme context, default to light theme
1+
// 기본값이 light인 ThemeContext
22
const ThemeContext = React.createContext('light');
33

4-
// Signed-in user context
4+
// 로그인한 유저 정보를 담는 UserContext
55
const UserContext = React.createContext({
66
name: 'Guest',
77
});
@@ -10,7 +10,7 @@ class App extends React.Component {
1010
render() {
1111
const {signedInUser, theme} = this.props;
1212

13-
// App component that provides initial context values
13+
// context 초기값을 제공하는 App 컴포넌트
1414
// highlight-range{2-3,5-6}
1515
return (
1616
<ThemeContext.Provider value={theme}>
@@ -31,7 +31,7 @@ function Layout() {
3131
);
3232
}
3333

34-
// A component may consume multiple contexts
34+
// 여러 context의 값을 받는 컴포넌트
3535
function Content() {
3636
// highlight-range{2-10}
3737
return (

examples/context/theme-detailed-app.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {ThemeContext, themes} from './theme-context';
22
import ThemedButton from './themed-button';
33

4-
// An intermediate component that uses the ThemedButton
4+
// ThemedButton를 사용하는 중간에 있는 컴포넌트
55
function Toolbar(props) {
66
return (
77
<ThemedButton onClick={props.changeTheme}>
@@ -28,10 +28,9 @@ class App extends React.Component {
2828
}
2929

3030
render() {
31-
//highlight-range{1-3}
32-
// The ThemedButton button inside the ThemeProvider
33-
// uses the theme from state while the one outside uses
34-
// the default dark theme
31+
//highlight-range{1-2}
32+
// ThemeProvider 안에 있는 ThemedButton은 state로부터 theme 값을 읽지만
33+
// Provider 밖에 있는 ThemedButton는 기본값인 dark를 사용합니다.
3534
//highlight-range{3-5,7}
3635
return (
3736
<Page>

examples/context/theme-detailed-theme-context.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ export const themes = {
1111

1212
// highlight-range{1-3}
1313
export const ThemeContext = React.createContext(
14-
themes.dark // default value
14+
themes.dark // 기본값
1515
);

examples/context/updating-nested-context-app.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class App extends React.Component {
1515
};
1616

1717
// highlight-range{1-2,5}
18-
// State also contains the updater function so it will
19-
// be passed down into the context provider
18+
// state에 업데이트 메서드도 포함되어있으므로
19+
// 이 또한 context Provider를 통해 전달될것입니다.
2020
this.state = {
2121
theme: themes.light,
2222
toggleTheme: this.toggleTheme,
@@ -25,7 +25,7 @@ class App extends React.Component {
2525

2626
render() {
2727
// highlight-range{1,3}
28-
// The entire state is passed to the provider
28+
// Provider에 state 전체를 넘겨줍니다.
2929
return (
3030
<ThemeContext.Provider value={this.state}>
3131
<Content />

examples/context/updating-nested-context-context.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Make sure the shape of the default value passed to
2-
// createContext matches the shape that the consumers expect!
1+
// createContext에 보내는 기본값의 모양을
2+
// 하위 컴포넌트가 받고 있는 매개변수 모양과 동일하게 만드는 것 잊지마세요!
33
// highlight-range{2-3}
44
export const ThemeContext = React.createContext({
55
theme: themes.dark,

examples/context/updating-nested-context-theme-toggler-button.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import {ThemeContext} from './theme-context';
22

33
function ThemeTogglerButton() {
44
// highlight-range{1-2,5}
5-
// The Theme Toggler Button receives not only the theme
6-
// but also a toggleTheme function from the context
5+
// ThemeTogglerButton는 context로부터
6+
// theme 값과 함께 toggleTheme 매서드도 받고 있습니다.
77
return (
88
<ThemeContext.Consumer>
99
{({theme, toggleTheme}) => (

0 commit comments

Comments
 (0)