Skip to content

Commit

Permalink
Merge branch 'master' into add-a-react-to-a-website
Browse files Browse the repository at this point in the history
  • Loading branch information
ymin1103 committed May 20, 2019
2 parents 9795144 + ad04fb6 commit 7facb10
Show file tree
Hide file tree
Showing 30 changed files with 626 additions and 493 deletions.
39 changes: 22 additions & 17 deletions content/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c

## Upcoming Conferences {#upcoming-conferences}

### React Finland 2019 {#react-finland-2019}
April 24-26 in Helsinki, Finland

[Website](https://react-finland.fi/) - [Twitter](https://twitter.com/ReactFinland)

### ReactJS Girls Conference
May 3, 2019 in London, UK

[Website](https://reactjsgirls.com/) - [Twitter](https://twitter.com/reactjsgirls)

### <React.NotAConf /> 2019 {#reactnotaconf--2019}
May 11 in Sofia, Bulgaria

[Website](http://react-not-a-conf.com/) - [Twitter](https://twitter.com/reactnotaconf) - [Facebook](https://www.facebook.com/events/780891358936156)

### ReactEurope 2019 {#reacteurope-2019}
May 23-24, 2019 in Paris, France

Expand All @@ -47,12 +32,12 @@ June 21, 2019 Chicago, Illinois USA

[Website](https://reactloop.com) - [Twitter](https://twitter.com/ReactLoop)

### Chain React 2019
### Chain React 2019 {#chain-react-2019}
July 11-12, 2019. Portland, OR, USA.

[Website](https://infinite.red/ChainReactConf)

### React Rally 2019
### React Rally 2019 {#react-rally-2019}
August 22-23, 2019. Salt Lake City, USA.

[Website](https://www.reactrally.com/) - [Twitter](https://twitter.com/ReactRally) - [Instagram](https://www.instagram.com/reactrally/)
Expand All @@ -72,6 +57,11 @@ September 13th, 2019. New York, USA

[Website](https://reactnewyork.com/) - [Twitter](https://twitter.com/reactnewyork)

### React Boston 2019 {#react-boston-2019}
September 21-22, 2019 in Boston, Massachusetts USA

[Website](https://www.reactboston.com/) - [Twitter](https://twitter.com/reactboston)

### React India 2019 {#react-india-2019}
September 26-28, 2019 in Goa, India

Expand Down Expand Up @@ -380,3 +370,18 @@ April 4-5, 2019 in Kraków, Poland
April 12, 2019 in Amsterdam, The Netherlands

[Website](https://react.amsterdam) - [Twitter](https://twitter.com/reactamsterdam) - [Facebook](https://www.facebook.com/reactamsterdam) - [Videos](https://youtube.com/c/ReactConferences)

### React Finland 2019 {#react-finland-2019}
April 24-26 in Helsinki, Finland

[Website](https://react-finland.fi/) - [Twitter](https://twitter.com/ReactFinland)

### ReactJS Girls Conference {#reactjs-girls-conference}
May 3, 2019 in London, UK

[Website](https://reactjsgirls.com/) - [Twitter](https://twitter.com/reactjsgirls)

### <React.NotAConf /> 2019 {#reactnotaconf--2019}
May 11 in Sofia, Bulgaria

[Website](http://react-not-a-conf.com/) - [Twitter](https://twitter.com/reactnotaconf) - [Facebook](https://www.facebook.com/events/780891358936156)
2 changes: 1 addition & 1 deletion content/docs/code-splitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const App = () => (

## Named Exports {#named-exports}

`React.lazy`는 현재 default exports만 지원합니다. named exports를 사용하고자 한다면 default로 이름을 재정의한 중간 모듈을 생성할 수 있습니다. 이렇게 하면 treeshaking이 계속 동작하고 사용하지 않는 컴포넌트는 가져오지 않습니다.
`React.lazy`는 현재 default exports만 지원합니다. named exports를 사용하고자 한다면 default로 이름을 재정의한 중간 모듈을 생성할 수 있습니다. 이렇게 하면 tree shaking이 계속 동작하고 사용하지 않는 컴포넌트는 가져오지 않습니다.

```js
// ManyComponents.js
Expand Down
2 changes: 1 addition & 1 deletion content/docs/faq-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Foo extends Component {

>**Note:**
>
>Using an arrow function in render creates a new function each time the component renders, which may have performance implications (see below).
>Using an arrow function in render creates a new function each time the component renders, which may break optimizations based on strict identity comparison.
### Is it OK to use arrow functions in render methods? {#is-it-ok-to-use-arrow-functions-in-render-methods}

Expand Down
18 changes: 9 additions & 9 deletions content/docs/faq-internals.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
id: faq-internals
title: Virtual DOM and Internals
title: Virtual DOM과 Internals
permalink: docs/faq-internals.html
layout: docs
category: FAQ
---

### What is the Virtual DOM? {#what-is-the-virtual-dom}
### Virtual DOM은 무엇인가요? {#what-is-the-virtual-dom}

The virtual DOM (VDOM) is a programming concept where an ideal, or "virtual", representation of a UI is kept in memory and synced with the "real" DOM by a library such as ReactDOM. This process is called [reconciliation](/docs/reconciliation.html).
Virtual DOM (VDOM)은 UI의 이상적인 또는 "가상"적인 표현을 메모리에 저장하고 ReactDOM과 같은 라이브러리에 의해 "실제" DOM과 동기화하는 프로그래밍 개념입니다. 이 과정을 [재조정](/docs/reconciliation.html)이라고 합니다.

This approach enables the declarative API of React: You tell React what state you want the UI to be in, and it makes sure the DOM matches that state. This abstracts out the attribute manipulation, event handling, and manual DOM updating that you would otherwise have to use to build your app.
이 접근방식이 React의 선언적 API를 가능하게 합니다. React에게 원하는 UI의 상태를 알려주면 이는 DOM이 그 상태와 일치하도록 합니다. 이러한 방식은 앱 구축에 사용해야 하는 어트리뷰트 조작, 이벤트 처리, 수동 DOM 업데이트를 추상화합니다.

Since "virtual DOM" is more of a pattern than a specific technology, people sometimes say it to mean different things. In React world, the term "virtual DOM" is usually associated with [React elements](/docs/rendering-elements.html) since they are the objects representing the user interface. React, however, also uses internal objects called "fibers" to hold additional information about the component tree. They may also be considered a part of "virtual DOM" implementation in React.
"virtual DOM"은 특정 기술이라기보다는 패턴에 가깝기 때문에 사람들은 때때로 다른 것을 의미한다고 이야기합니다. React의 세계에서 "virtual DOM"이라는 용어는 보통 사용자 인터페이스를 나타내는 객체이기 때문에 [React elements](/docs/rendering-elements.html)와 연관됩니다. 그러나 React는 컴포넌트 트리에 대한 추가 정보를 포함하기 위해 "fibers"라는 내부 객체를 사용합니다. 또한 React에서 "virtual DOM" 구현의 일부로 간주할 수 있습니다.

### Is the Shadow DOM the same as the Virtual DOM? {#is-the-shadow-dom-the-same-as-the-virtual-dom}
### Shadow DOM은 Virtual DOM과 같은가요? {#is-the-shadow-dom-the-same-as-the-virtual-dom}

No, they are different. The Shadow DOM is a browser technology designed primarily for scoping variables and CSS in web components. The virtual DOM is a concept implemented by libraries in JavaScript on top of browser APIs.
아니요, 둘은 다릅니다. Shadow DOM은 주로 웹 컴포넌트의 범위 지정 변수 및 CSS용으로 설계된 브라우저 기술입니다. virtual DOM은 브라우저 API 위에 있는 JavaScript 라이브러리에서 구현되는 개념입니다.

### What is "React Fiber"? {#what-is-react-fiber}
### "React Fiber"는 무엇인가요? {#what-is-react-fiber}

Fiber is the new reconciliation engine in React 16. Its main goal is to enable incremental rendering of the virtual DOM. [Read more](https://github.com/acdlite/react-fiber-architecture).
Fiber는 React 16의 새로운 재조정 엔진입니다. 이 프로그램의 주요 목표는 virtual DOM의 증분 렌더링을 활성화하는 것입니다. [더 읽기](https://github.com/acdlite/react-fiber-architecture).
2 changes: 1 addition & 1 deletion content/docs/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class EssayForm extends React.Component {
}
```

`this.state.value`를 생성자에서 초기화하므로 textare는 일부 텍스트를 가진채 시작되는 점을 주의해주세요.
`this.state.value`를 생성자에서 초기화하므로 textarea는 일부 텍스트를 가진채 시작되는 점을 주의해주세요.

## select 태그 {#the-select-tag}

Expand Down
2 changes: 1 addition & 1 deletion content/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ React 문서는 Javascript 프로그래밍에 익숙한 사람을 대상으로

### 고급 개념 {#advanced-concepts}

[주요 개념](#main-concepts)에 익숙해지고 React를 더 많이 다루게 되면 보다 고급 주제에 관심을 가지게 될 것입니다. 이 섹션에서는 [context](/docs/context.html)[refs](/docs/refs-and-dom.html)와 같이 강력하지만 일반적으로 사용되지는 않는 React 기능을 소개합니다.
[주요 개념](/docs/hello-world.html)에 익숙해지고 React를 더 많이 다루게 되면 보다 고급 주제에 관심을 가지게 될 것입니다. 이 섹션에서는 [context](/docs/context.html)[refs](/docs/refs-and-dom.html)와 같이 강력하지만 일반적으로 사용되지는 않는 React 기능을 소개합니다.

### API 참조 {#api-reference}

Expand Down
4 changes: 2 additions & 2 deletions content/docs/hooks-effect.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function FriendStatusWithCounter(props) {
}
```
**Hooks lets us split the code based on what it is doing** rather than a lifecycle method name. React will apply *every* effect used by the component, in the order they were specified.
**Hooks let us split the code based on what it is doing** rather than a lifecycle method name. React will apply *every* effect used by the component, in the order they were specified.
### Explanation: Why Effects Run on Each Update {#explanation-why-effects-run-on-each-update}
Expand Down Expand Up @@ -473,7 +473,7 @@ In the future, the second argument might get added automatically by a build-time
>
>If you use this optimization, make sure the array includes **all values from the component scope (such as props and state) that change over time and that are used by the effect**. Otherwise, your code will reference stale values from previous renders. Learn more about [how to deal with functions](/docs/hooks-faq.html#is-it-safe-to-omit-functions-from-the-list-of-dependencies) and [what to do when the array changes too often](/docs/hooks-faq.html#what-can-i-do-if-my-effect-dependencies-change-too-often).
>
>If you want to run an effect and clean it up only once (on mount and unmount), you can pass an empty array (`[]`) as a second argument. This tells React that your effect doesn't depend on *any* values from props or state, so it never needs to re-run. This isn't handled as a special case -- it follows directly from how the inputs array always works.
>If you want to run an effect and clean it up only once (on mount and unmount), you can pass an empty array (`[]`) as a second argument. This tells React that your effect doesn't depend on *any* values from props or state, so it never needs to re-run. This isn't handled as a special case -- it follows directly from how the dependencies array always works.
>
>If you pass an empty array (`[]`), the props and state inside the effect will always have their initial values. While passing `[]` as the second argument is closer to the familiar `componentDidMount` and `componentWillUnmount` mental model, there are usually [better](/docs/hooks-faq.html#is-it-safe-to-omit-functions-from-the-list-of-dependencies) [solutions](/docs/hooks-faq.html#what-can-i-do-if-my-effect-dependencies-change-too-often) to avoid re-running effects too often. Also, don't forget that React defers running `useEffect` until after the browser has painted, so doing extra work is less of a problem.
>
Expand Down
17 changes: 7 additions & 10 deletions content/docs/hooks-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ There are a few more heuristics, and they might change over time as we fine-tune

* `componentDidCatch` and `getDerivedStateFromError`: There are no Hook equivalents for these methods yet, but they will be added soon.

### How can I do data fetching with Hooks?
### How can I do data fetching with Hooks? {#how-can-i-do-data-fetching-with-hooks}

Here is a [small demo](https://codesandbox.io/s/jvvkoo8pq3) to get you started. To learn more, check out [this article](https://www.robinwieruch.de/react-hooks-fetch-data/) about data fetching with Hooks.

Expand Down Expand Up @@ -654,7 +654,7 @@ function ProductDetails({ fetchProduct })

Note that in the above example we **need** to keep the function in the dependencies list. This ensures that a change in the `productId` prop of `ProductPage` automatically triggers a refetch in the `ProductDetails` component.

### What can I do if my effect dependencies change too often?
### What can I do if my effect dependencies change too often? {#what-can-i-do-if-my-effect-dependencies-change-too-often}

Sometimes, your effect may be using reading state that changes too often. You might be tempted to omit that state from a list of dependencies, but that usually leads to bugs:

Expand Down Expand Up @@ -740,7 +740,7 @@ The [`useMemo`](/docs/hooks-reference.html#usememo) Hook lets you cache calculat
const memoizedValue = useMemo(() => computeExpensiveValue(a, b), [a, b]);
```

This code calls `computeExpensiveValue(a, b)`. But if the inputs `[a, b]` haven't changed since the last value, `useMemo` skips calling it a second time and simply reuses the last value it returned.
This code calls `computeExpensiveValue(a, b)`. But if the dependencies `[a, b]` haven't changed since the last value, `useMemo` skips calling it a second time and simply reuses the last value it returned.

Remember that the function passed to `useMemo` runs during rendering. Don't do anything there that you wouldn't normally do while rendering. For example, side effects belong in `useEffect`, not `useMemo`.

Expand All @@ -767,7 +767,7 @@ Note that this approach won't work in a loop because Hook calls [can't](/docs/ho

### How to create expensive objects lazily? {#how-to-create-expensive-objects-lazily}

`useMemo` lets you [memoize an expensive calculation](#how-to-memoize-calculations) if the inputs are the same. However, it only serves as a hint, and doesn't *guarantee* the computation won't re-run. But sometimes you need to be sure an object is only created once.
`useMemo` lets you [memoize an expensive calculation](#how-to-memoize-calculations) if the dependencies are the same. However, it only serves as a hint, and doesn't *guarantee* the computation won't re-run. But sometimes you need to be sure an object is only created once.

**The first common use case is when creating the initial state is expensive:**

Expand Down Expand Up @@ -809,13 +809,10 @@ function Image(props) {

// ✅ IntersectionObserver is created lazily once
function getObserver() {
let observer = ref.current;
if (observer !== null) {
return observer;
if (ref.current === null) {
ref.current = new IntersectionObserver(onIntersect);
}
let newObserver = new IntersectionObserver(onIntersect);
ref.current = newObserver;
return newObserver;
return ref.current;
}

// When you need it, call getObserver()
Expand Down

0 comments on commit 7facb10

Please sign in to comment.