Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation for Advanced Guides/Refs and the DOM #13

Merged
merged 4 commits into from Feb 28, 2019
Merged

Translation for Advanced Guides/Refs and the DOM #13

merged 4 commits into from Feb 28, 2019

Conversation

ENvironmentSet
Copy link
Contributor

@ENvironmentSet ENvironmentSet commented Feb 9, 2019

some weird translations may be included. needs your feedbacks :))

@tesseralis tesseralis mentioned this pull request Feb 9, 2019
98 tasks
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
@ENvironmentSet
Copy link
Contributor Author

리뷰 감사합니다. 수정하고 PR 업데이트 하도록 하겠습니다.


If the `ref` callback is defined as an inline function, it will get called twice during updates, first with `null` and then again with the DOM element. This is because a new instance of the function is created with each render, so React needs to clear the old ref and set up the new one. You can avoid this by defining the `ref` callback as a bound method on the class, but note that it shouldn't matter in most cases.
만약 `ref` 콜백이 인라인 함수로 선언되있다면 `ref` 콜백은 업데이트 과정 중에 처음에는 `null`로, 그 다음에는 DOM 엘리먼트로, 총 두 번 호출됩니다. 이러한 현상은 매 랜더링마다 `ref` 콜백의 새 인스턴스가 생성되므로 React가 이전에 사용된 ref을 제거하고 새 ref을 설정해야 하기 때문에 일어납니다. 이러한 현상은 `ref` 콜백을 클래스에 바인딩된 메서드로 선언함으로서 해결할 수 있습니다. 하지만 많은 경우 이러한 현상은 문제가 되지 않는다는 점을 기억하세요.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 번역이 매끄럽게 되지 않은 것 처럼 보입니다. 더 나은 번역이 있다면 추천 부탁드립니다.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 만약선언되있다면로 인해 삭제해도 될 것 같아요.
  • 랜더링 -> 렌더링
  • ref을 제거하고 새 ref을 -> ref를 제거하고 새 ref를 ref는 레퍼런스로 읽고 있어요 (Translate Glossary)
  • 선언함으로서 -> 선언함으로써

This was referenced Feb 11, 2019
@taehwanno taehwanno mentioned this pull request Feb 15, 2019
3 tasks
Copy link
Member

@taehwanno taehwanno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

피드백이 조금 느렸네요. 빠르게 드릴 수 있도록 노력할게요 :)

content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved
content/docs/refs-and-the-dom.md Outdated Show resolved Hide resolved

If the `ref` callback is defined as an inline function, it will get called twice during updates, first with `null` and then again with the DOM element. This is because a new instance of the function is created with each render, so React needs to clear the old ref and set up the new one. You can avoid this by defining the `ref` callback as a bound method on the class, but note that it shouldn't matter in most cases.
만약 `ref` 콜백이 인라인 함수로 선언되있다면 `ref` 콜백은 업데이트 과정 중에 처음에는 `null`로, 그 다음에는 DOM 엘리먼트로, 총 두 번 호출됩니다. 이러한 현상은 매 랜더링마다 `ref` 콜백의 새 인스턴스가 생성되므로 React가 이전에 사용된 ref을 제거하고 새 ref을 설정해야 하기 때문에 일어납니다. 이러한 현상은 `ref` 콜백을 클래스에 바인딩된 메서드로 선언함으로서 해결할 수 있습니다. 하지만 많은 경우 이러한 현상은 문제가 되지 않는다는 점을 기억하세요.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 만약선언되있다면로 인해 삭제해도 될 것 같아요.
  • 랜더링 -> 렌더링
  • ref을 제거하고 새 ref을 -> ref를 제거하고 새 ref를 ref는 레퍼런스로 읽고 있어요 (Translate Glossary)
  • 선언함으로서 -> 선언함으로써

- **You may not use the `ref` attribute on function components** because they don't have instances.
- `ref` 어트리뷰트가 HTML 엘리먼트에 쓰였다면, 생성자에서 `React.createRef()`으로 생성된 `ref`은 자신을 전달받은 DOM 엘리먼트를 `current` 프로퍼티의 값으로서 받습니다.
- `ref` 어트리뷰트가 커스텀 클래스 컴포넌트에 쓰였다면, `ref` 객체는 마운트된 컴포넌트의 인스턴스를 `current` 프로퍼티의 값으로서 받습니다.
- **함수형 컴포넌트는 인스턴스가 없기 때문에 함수형 컴포넌트에 ref 어트리뷰트를 사용할 수 없습니다**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변경 누락된 것 같아요. 함수형 컴포넌트 -> 함수 컴포넌트로 수정 부탁드려요. (2개의 함수형이 수정돼야 합니다.)

@taehwanno taehwanno added the needs author response Changes requested needing author's input label Feb 28, 2019
@netlify
Copy link

netlify bot commented Feb 28, 2019

Deploy preview for ko-reactjs-org ready!

Built with commit a6b8d8d

https://deploy-preview-13--ko-reactjs-org.netlify.com

taehwanno
taehwanno previously approved these changes Feb 28, 2019
@taehwanno taehwanno added needs +1 approval and removed needs author response Changes requested needing author's input labels Feb 28, 2019
hg-pyun
hg-pyun previously approved these changes Feb 28, 2019
Copy link
Member

@hg-pyun hg-pyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@taehwanno taehwanno dismissed stale reviews from hg-pyun and themself via a6b8d8d February 28, 2019 12:07
@taehwanno
Copy link
Member

a6b8d8d 함수형 -> 함수로 직접 수정해서 반영했습니다 :)

@taehwanno taehwanno merged commit 8cfc674 into reactjs:master Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants