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: content/blog/2019-02-23-is-react-translated-yet.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,19 +13,19 @@ In addition, the following three languages have completed translating most of th
13
13
14
14
Special congratulations to [Alejandro Ñáñez Ortiz](https://github.com/alejandronanez), [Rainer Martínez Fraga](https://github.com/carburo), [David Morales](https://github.com/dmorales), [Miguel Alejandro Bolivar Portilla](https://github.com/Darking360), and all the contributors to the Spanish translation for being the first to *completely* translate the core pages of the docs!
React already has many meetups and conferences around the world, but many programmers don't use English as their primary language. We’d love to support local communities who use React by making our documentation available in most popular languages.
19
19
20
20
In the past, React community members have created unofficial translations for [Chinese](https://github.com/discountry/react), [Arabic](https://wiki.hsoub.com/React), and [Korean](https://github.com/reactjs/ko.reactjs.org/issues/4); by making an official channel for these translated docs we're hoping to make them easier to find and help make sure that non-English-speaking users of React aren't left behind.
21
21
22
-
## Contributing
22
+
## Contributing {#contributing}
23
23
24
24
If you would like to help out on a current translation, check out the [Languages](/languages) page and click on the "Contribute" link for your language.
25
25
26
26
Can't find your language? If you'd like to maintain your langauge's translation fork, follow the instructions in the [translation repo](https://github.com/reactjs/reactjs.org-translation#starting-a-new-translation)!
27
27
28
-
## Backstory
28
+
## Backstory {#backstory}
29
29
30
30
Hi everyone! I'm [Nat](https://twitter.com/tesseralis)! You may know me as the [polyhedra lady](https://www.youtube.com/watch?v=Ew-UzGC8RqQ). For the past few weeks, I've been helping the React team coordinate their translation effort. Here's how I did it.
31
31
@@ -45,7 +45,7 @@ After the trial period, we were ready to accept more languages. I created [a scr
45
45
46
46
Because of the automation, the rest of the maintance went mostly smoothly. We eventually created a [Slack channel](https://rt-slack-invite.herokuapp.com) to make it easier for translators to share information, and I released a guide solidifying the [responsibilities of maintainers](https://github.com/reactjs/reactjs.org-translation/blob/master/maintainer-guide.md). Allowing translators to talk with each other was a great boon -- for example, the Arabic, Persian, and Hebrew translations were able to talk to each other in order to get [right-to-left text](https://en.wikipedia.org/wiki/Right-to-left) working!
47
47
48
-
## The Bot
48
+
## The Bot {#the-bot}
49
49
50
50
The most challenging part was getting the bot to sync changes from the English version of the site. Initially we were using the [che-tsumi](https://github.com/vuejs-jp/che-tsumi) bot created by the Japanese Vue translation team, but we soon decided to build our own bot to suit our needs. In particular, the che-tsumi bot works by [cherry picking](https://git-scm.com/docs/git-cherry-pick) new commits. This ended up causing a cavalade of new issues that were interconnected, especially when [Hooks were released](/blog/2019/02/06/react-v16.8.0.html).
51
51
@@ -63,13 +63,13 @@ There were other smaller issues that I ran into. I tried using the [Heroku Sched
63
63
64
64
There are, as always, improvements I want to make to the bot. Right now it doesn't check whether there is an outstanding pull request before pushing another one. It's still hard to tell the exact change that happened in the original source, and it's possible to miss out on a needed translation change. But I trust the maintainers we've chosen to work through these issues, and the bot is [open source](https://github.com/reactjs/reactjs.org-translation) if anyone wants to help me make these improvements!
65
65
66
-
## Thanks
66
+
## Thanks {#thanks}
67
67
68
68
Finally, I would like to extend my gratitude to the following people and groups:
69
69
70
70
* All the translation maintainers and contributors who are helping translate React to more than thirty languages.
71
71
* The [Vue.js Japan User Group](https://github.com/vuejs-jp) for initiating the idea of having bot-managed translations, and especially [Hanatani Takuma](https://github.com/potato4d) for helping us understand their approach and helping maintain the Japanese translation.
72
-
*[Soichiro Miki](https://github.com/smikitki) for many [contributions](https://github.com/reactjs/reactjs.org/pull/1636) and thoughtful comments on the overall translation process, as well as for maintaining the Japanese translation.
72
+
*[Soichiro Miki](https://github.com/smikitky) for many [contributions](https://github.com/reactjs/reactjs.org/pull/1636) and thoughtful comments on the overall translation process, as well as for maintaining the Japanese translation.
73
73
*[Eric Nakagawa](https://github.com/ericnakagawa) for managing our previous translation process.
74
74
*[Brian Vaughn](https://github.com/bvaughn) for setting up the [languages page](/languages) and managing all the subdomains.
Copy file name to clipboardExpand all lines: content/community/examples.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,10 @@ There are many example projects created by the React community. Feel free to add
11
11
12
12
***[Calculator](https://github.com/ahfarmer/calculator)** Implementation of the iOS calculator built in React
13
13
***[Emoji Search](https://github.com/ahfarmer/emoji-search)** Simple React app for searching emoji
14
-
***[Github Battle App](https://github.com/ReactTraining/react-fundamentals/tree/hosting)** Battle two Github users and see the most popular Github projects for any language.
14
+
***[Github Battle App](https://tm.dev/react-course-project/)** Battle two Github users and see the most popular Github projects for any language.
15
15
***[React Powered Hacker News Client](https://github.com/insin/react-hn)** A React & react-router-powered implementation of Hacker News using its Firebase API.
16
16
***[Pokedex](https://github.com/alik0211/pokedex)** The list of Pokémon with live search
17
-
***[Shopping Cart](https://github.com/jeffersonRibeiro/react-shopping-cart)** Simple ecommerce cart application built using React
17
+
***[Shopping Cart](https://github.com/jeffersonRibeiro/react-shopping-cart)** Simple ecommerce cart application built using React
18
18
***[Progressive Web Tetris](https://github.com/skidding/flatris)** Besides a beautiful, mobile-friendly implementation of Tetris, this project is a playground for integrating and experimenting with web technologies.
19
19
***[Product Comparison Page](https://github.com/Rhymond/product-compare-react)** Simple Product Compare page built in React
20
20
***[Hacker News Clone React/GraphQL](https://github.com/clintonwoo/hackernews-react-graphql)** Hacker News clone rewritten with universal JavaScript, using React and GraphQL.
Copy file name to clipboardExpand all lines: content/docs/composition-vs-inheritance.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,22 @@
1
1
---
2
2
id: composition-vs-inheritance
3
-
title: Composition vs Inheritance
3
+
title: 합성 (Composition) vs 상속 (Inheritance)
4
4
permalink: docs/composition-vs-inheritance.html
5
5
redirect_from:
6
6
- "docs/multiple-components.html"
7
7
prev: lifting-state-up.html
8
8
next: thinking-in-react.html
9
9
---
10
10
11
-
React has a powerful composition model, and we recommend using composition instead of inheritance to reuse code between components.
11
+
React는 강력한 합성 모델을 가지고 있으며, 상속 대신 합성을 사용하여 컴포넌트 간에 코드를 재사용하는 것이 좋습니다.
12
12
13
-
In this section, we will consider a few problems where developers new to React often reach for inheritance, and show how we can solve them with composition.
13
+
이번 문서에서는 React를 처음 접한 개발자들이 종종 상속으로 인해 부딪히는 몇 가지 문제들과 합성을 통해 이러한 문제를 해결하는 방법을 살펴볼 것입니다.
14
14
15
-
## Containment {#containment}
15
+
## 컴포넌트에서 다른 컴포넌트를 담기 {#containment}
16
16
17
-
Some components don't know their children ahead of time. This is especially common for components like `Sidebar`or`Dialog` that represent generic "boxes".
17
+
어떤 컴포넌트들은 어떤 자식 엘리먼트가 들어올 지 미리 예상할 수 없는 경우가 있습니다. 범용적인 '박스' 역할을 하는 `Sidebar`혹은`Dialog`와 같은 컴포넌트에서 특히 자주 볼 수 있습니다.
18
18
19
-
We recommend that such components use the special `children`prop to pass children elements directly into their output:
19
+
이러한 컴포넌트에서는 특수한 `children`prop을 사용하여 자식 엘리먼트를 출력에 그대로 전달하는 것이 좋습니다.
20
20
21
21
```js{4}
22
22
function FancyBorder(props) {
@@ -28,7 +28,7 @@ function FancyBorder(props) {
28
28
}
29
29
```
30
30
31
-
This lets other components pass arbitrary children to them by nesting the JSX:
31
+
이러한 방식으로 다른 컴포넌트에서 JSX를 중첩하여 임의의 자식을 전달할 수 있습니다.
32
32
33
33
```js{4-9}
34
34
function WelcomeDialog() {
@@ -45,11 +45,11 @@ function WelcomeDialog() {
45
45
}
46
46
```
47
47
48
-
**[Try it on CodePen](https://codepen.io/gaearon/pen/ozqNOV?editors=0010)**
Anything inside the `<FancyBorder>` JSX tag gets passed into the `FancyBorder`component as a `children`prop. Since `FancyBorder` renders `{props.children}` inside a `<div>`, the passed elements appear in the final output.
50
+
`<FancyBorder>` JSX 태그 안에 있는 것들이 `FancyBorder`컴포넌트의 `children`prop으로 전달됩니다. `FancyBorder`는 `{props.children}`을 `<div>` 안에 렌더링하므로 전달된 엘리먼트들이 최종 출력됩니다.
51
51
52
-
While this is less common, sometimes you might need multiple "holes" in a component. In such cases you may come up with your own convention instead of using `children`:
52
+
흔하진 않지만 종종 컴포넌트에 여러 개의 "구멍"이 필요할 수도 있습니다. 이런 경우에는 `children` 대신 자신만의 고유한 방식을 적용할 수도 있습니다.
53
53
54
54
```js{5,8,18,21}
55
55
function SplitPane(props) {
@@ -78,15 +78,15 @@ function App() {
78
78
}
79
79
```
80
80
81
-
[**Try it on CodePen**](https://codepen.io/gaearon/pen/gwZOJp?editors=0010)
React elements like `<Contacts />` and `<Chat />` are just objects, so you can pass them as props like any other data. This approach may remind you of "slots" in other libraries but there are no limitations on what you can pass as props in React.
83
+
`<Contacts />`와 `<Chat />`같은 React 엘리먼트는 단지 객체이기 때문에 다른 데이터처럼 prop으로 전달할 수 있습니다. 이러한 접근은 다른 라이브러리의 "슬롯 (slots)"과 비슷해보이지만 React에서 prop으로 전달할 수 있는 것에는 제한이 없습니다.
84
84
85
-
## Specialization {#specialization}
85
+
## 특수화 {#specialization}
86
86
87
-
Sometimes we think about components as being "special cases" of other components. For example, we might say that a `WelcomeDialog` is a special case of `Dialog`.
87
+
때로는 어떤 컴포넌트의 "특수한 경우"인 컴포넌트를 고려해야 하는 경우가 있습니다. 예를 들어, `WelcomeDialog`는 `Dialog`의 특수한 경우라고 할 수 있습니다.
88
88
89
-
In React, this is also achieved by composition, where a more "specific" component renders a more "generic" one and configures it with props:
89
+
React에서는 이 역시 합성을 통해 해결할 수 있습니다. 더 "구체적인" 컴포넌트가 "일반적인" 컴포넌트를 렌더링하고 props를 통해 내용을 구성합니다.
90
90
91
91
```js{5,8,16-18}
92
92
function Dialog(props) {
@@ -111,9 +111,9 @@ function WelcomeDialog() {
111
111
}
112
112
```
113
113
114
-
[**Try it on CodePen**](https://codepen.io/gaearon/pen/kkEaOZ?editors=0010)
## So What About Inheritance? {#so-what-about-inheritance}
166
+
## 그렇다면 상속은? {#so-what-about-inheritance}
167
167
168
-
At Facebook, we use React in thousands of components, and we haven't found any use cases where we would recommend creating component inheritance hierarchies.
168
+
Facebook에서는 수천 개의 React 컴포넌트를 사용하지만, 컴포넌트를 상속 계층 구조로 작성을 권장할만한 사례를 아직 찾지 못했습니다.
169
169
170
-
Props and composition give you all the flexibility you need to customize a component's look and behavior in an explicit and safe way. Remember that components may accept arbitrary props, including primitive values, React elements, or functions.
170
+
props와 합성은 명시적이고 안전한 방법으로 컴포넌트의 모양과 동작을 커스터마이징하는데 필요한 모든 유연성을 제공합니다. 컴포넌트가 원시 타입의 값, React 엘리먼트 혹은 함수 등 어떠한 props도 받을 수 있다는 것을 기억하세요.
171
171
172
-
If you want to reuse non-UI functionality between components, we suggest extracting it into a separate JavaScript module. The components may import it and use that function, object, or a class, without extending it.
172
+
UI가 아닌 기능을 여러 컴포넌트에서 재사용하기를 원한다면, 별도의 JavaScript 모듈로 분리하는 것이 좋습니다. 컴포넌트에서 해당 함수, 객체, 클래스 등을 import 하여 사용할 수 있습니다. 상속받을 필요 없이 말이죠.
Copy file name to clipboardExpand all lines: content/docs/context.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ For example, consider a `Page` component that passes a `user` and `avatarSize` p
54
54
55
55
It might feel redundant to pass down the `user` and `avatarSize` props through many levels if in the end only the `Avatar` component really needs it. It's also annoying that whenever the `Avatar` component needs more props from the top, you have to add them at all the intermediate levels too.
56
56
57
-
One way to solve this issue **without context** is to [pass down the `Avatar` component itself](/docs/composition-vs-inheritance.html#containment) so that the intermediate components don't need to know about the `user`prop:
57
+
One way to solve this issue **without context** is to [pass down the `Avatar` component itself](/docs/composition-vs-inheritance.html#containment) so that the intermediate components don't need to know about the `user`or `avatarSize` props:
Copy file name to clipboardExpand all lines: content/docs/legacy-context.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,11 +152,11 @@ If `contextTypes` is defined within a component, the following [lifecycle method
152
152
>
153
153
> As of React 16, `componentDidUpdate` no longer receives `prevContext`.
154
154
155
-
### Referencing Context in Stateless Function Components {#referencing-context-in-stateless-function-components}
155
+
### Referencing Context in Function Components {#referencing-context-in-stateless-function-components}
156
156
157
157
> This section documents a legacy API. See the [new API](/docs/context.html).
158
158
159
-
Stateless function components are also able to reference `context` if `contextTypes` is defined as a property of the function. The following code shows a `Button` component written as a stateless function component.
159
+
Function components are also able to reference `context` if `contextTypes` is defined as a property of the function. The following code shows a `Button` component written as a function component.
React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). If you support older browsers and devices which may not yet provide these natively (e.g. IE < 11) or which have non-compliant implementations (e.g. IE 11), consider including a global polyfill in your bundled application, such as [core-js](https://github.com/zloirock/core-js) or [babel-polyfill](https://babeljs.io/docs/usage/polyfill/).
9
+
React 16 버전은 컬렉션 자료형인 [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)과 [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)을 사용합니다. 이 기능을 자체적으로 지원하지 않거나(예. IE 11 미만) 지원은 하지만 잘 호환되지 않는(예. IE 11) 오래된 브라우저나 기기에서도 React를 사용해야 한다면 애플리케이션에 [core-js](https://github.com/zloirock/core-js)나 [babel-polyfill](https://babeljs.io/docs/usage/polyfill/) 같은 전역 폴리필(polyfill)을 포함하는 것도 고려해보세요.
10
10
11
-
A polyfilled environment for React 16 using core-js to support older browsers might look like:
11
+
다음은 오래된 브라우저 지원을 위해 core-js 폴리필을 적용한 환경에서 React 16 버전을 사용하는 예시입니다.
12
12
13
13
```js
14
14
import'core-js/es6/map';
@@ -23,8 +23,8 @@ ReactDOM.render(
23
23
);
24
24
```
25
25
26
-
React also depends on `requestAnimationFrame`(even in test environments).
27
-
You can use the [raf](https://www.npmjs.com/package/raf)package to shim `requestAnimationFrame`:
26
+
React에는 `requestAnimationFrame`기능도 필요한데, 이는 테스트 환경에서도 사용됩니다.
27
+
오래된 브라우저에서는 [raf](https://www.npmjs.com/package/raf)패키지를 사용하여 `requestAnimationFrame` 기능을 지원할 수 있습니다.
0 commit comments