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

State As a Snapshot 번역 #396

Merged
merged 5 commits into from Jan 14, 2022
Merged

Conversation

h2ck4u
Copy link
Contributor

@h2ck4u h2ck4u commented Dec 14, 2021

@github-actions github-actions bot added the beta label Dec 14, 2021
@h2ck4u h2ck4u changed the title 📝 State As a Snapshot 번역 1차 State As a Snapshot 번역 1차 Dec 14, 2021
@h2ck4u h2ck4u changed the title State As a Snapshot 번역 1차 State As a Snapshot 번역 Dec 14, 2021

In React, it works a little differently from this mental model. On the previous page, you saw that [setting state requests a re-render](/learn/render-and-commit#step-1-trigger-a-render) from React. This means that for an interface to react to the input, you need to set its state.
Copy link
Contributor Author

@h2ck4u h2ck4u Dec 14, 2021

Choose a reason for hiding this comment

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

it works a little differently from this mental model
이 부분에서 mental model의 번역에 어려움이 있었습니다.
도움을 주시면 감사하겠습니다.

Copy link
Member

Choose a reason for hiding this comment

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

React에서 이것은 일반적인 예상과 조금 다르게 동작합니다. 정도로 번역하면 어떨까요?

Copy link
Member

Choose a reason for hiding this comment

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

전체적으로 리 렌더링 보다는 다시 같은 한국어로 바꾸면 좋을 것 같습니다.


You can also visualize this by mentally substituting state variables with their values in your code. Since the `number` state variable is `0` for *this render*, its event handler looks like this:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can also visualize this by mentally substituting state variables with their values in your code
이 부분에서 by mentally substituting의 번역에 어려움이 있었습니다.
도움을 주시면 감사하겠습니다.

* When you call `useState`, React gives you a snapshot of the state *for that render*.
* Variables and event handlers don't "survive" re-renders. Every render has its own event handlers.
* Every render (and functions inside it) will always "see" the snapshot of the state that React gave to *that* render.
* You can mentally substitute state in event handlers, similarly to how you think about the rendered JSX.
Copy link
Contributor Author

@h2ck4u h2ck4u Dec 14, 2021

Choose a reason for hiding this comment

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

You can mentally substitute state in event handlers
이 부분에서 mentally substitute state의 번역에 어려움이 있었습니다.
도움을 주시면 감사하겠습니다.

@gnujoow
Copy link
Member

gnujoow commented Dec 16, 2021

PR 올려주셔서 감사합니다. 우선은 pr template에 있는 항목들을 모두 확인 해주시고 반영해주시면 감사하겠습니다.
이를테면) state -> 상태로 옮겨주셧는데, 이는 번역하면 안되는 용어에 해당합니다.

---

<Intro>

State variables might look like regular JavaScript variables that you can read and write to. However, state behaves more like a snapshot. Setting it does not change the state variable you already have, but instead triggers a re-render.
읽고 쓰는 State 변수는 일반적인 자바스크립트 변수처럼 보일 수 있습니다. 그러나 state는 스냅샷 처럼 작동합니다. state를 설정하여도 이미 가지고 있는 state는 변경되지 않고, 대신에 리 렌더링을 실행합니다.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
읽고 쓰는 State 변수는 일반적인 자바스크립트 변수처럼 보일 수 있습니다. 그러나 state는 스냅샷 처럼 작동합니다. state를 설정하여도 이미 가지고 있는 state는 변경되지 않고, 대신에 렌더링을 실행합니다.
읽고 쓰는 State 변수는 일반적인 자바스크립트 변수처럼 보일 수 있습니다. 그러나 state는 스냅샷 처럼 작동합니다. state를 설정하여도 이미 가지고 있는 state는 변경되지 않고, 대신에 다시 렌더링을 실행합니다.

* When and how state updates
* Why state does not update immediately after you set it
* How event handlers access a "snapshot" of the state
* state 설정이 어떻게 리 렌더링을 실행하는지
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* state 설정이 어떻게 렌더링을 실행하는지
* state 설정이 어떻게 다시 렌더링을 실행하는지


<Illustration alt="A linear progression from a form, to a finger on the submit button, to a confirmation message." src="/images/docs/sketches/s_ui-response.jpg" />
<Illustration alt="폼에서부터 제출버튼 위에 손가락에서 확인메세지까지의 선형 과정입니다." src="/images/docs/sketches/s_ui-response.jpg" />
Copy link
Member

Choose a reason for hiding this comment

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

선형 과정이란 단어가 직관적이지 않은 것 같아요. 좀 더 이해하기 쉬운 단어로 바꾸면 어떨까요?

Copy link
Contributor Author

@h2ck4u h2ck4u Dec 23, 2021

Choose a reason for hiding this comment

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

폼에서부터 제출버튼 위에 손가락을 대고 있는 모습 그리고 확인메세지까지의 진행 과정입니다.

로 수정해보았습니다.


In React, it works a little differently from this mental model. On the previous page, you saw that [setting state requests a re-render](/learn/render-and-commit#step-1-trigger-a-render) from React. This means that for an interface to react to the input, you need to set its state.
Copy link
Member

Choose a reason for hiding this comment

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

React에서 이것은 일반적인 예상과 조금 다르게 동작합니다. 정도로 번역하면 어떨까요?


In React, it works a little differently from this mental model. On the previous page, you saw that [setting state requests a re-render](/learn/render-and-commit#step-1-trigger-a-render) from React. This means that for an interface to react to the input, you need to set its state.
Copy link
Member

Choose a reason for hiding this comment

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

전체적으로 리 렌더링 보다는 다시 같은 한국어로 바꾸면 좋을 것 같습니다.


<Solution>

Your `alert` should look like this:
`알럿`은 다음과 같아야 합니다.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`알럿`은 다음과 같아야 합니다.
`경고창`은 다음과 같아야 합니다.

@@ -412,17 +413,17 @@ h1 { margin-top: 20px; }

</Sandpack>

Whether you put it before or after the `setWalk` call makes no difference. That render's value of `walk` is fixed. Calling `setWalk` will only change it for the *next* render, but will not affect the event handler from the previous render.
알럿을 `setWalk` 호출 전후에 배치하든 상관없이 차이가 없습니다. 렌더링의 `walk` 값은 고정되어 있습니다. `setWalk`를 호출하면 *다음* 렌더링에 대해서만 변경되지만, 이전 렌더링의 이벤트 핸들러에는 영향을 미치지 않습니다.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
알럿을 `setWalk` 호출 전후에 배치하든 상관없이 차이가 없습니다. 렌더링의 `walk` 값은 고정되어 있습니다. `setWalk`를 호출하면 *다음* 렌더링에 대해서만 변경되지만, 이전 렌더링의 이벤트 핸들러에는 영향을 미치지 않습니다.
경고창을 `setWalk` 호출 전후에 배치하든 상관없이 차이가 없습니다. 렌더링의 `walk` 값은 고정되어 있습니다. `setWalk`를 호출하면 *다음* 렌더링에 대해서만 변경되지만, 이전 렌더링의 이벤트 핸들러에는 영향을 미치지 않습니다.

hg-pyun
hg-pyun previously approved these changes Dec 27, 2021
@hg-pyun
Copy link
Member

hg-pyun commented Dec 27, 2021

@gnujoow 님 최종 컨펌을 기다려봅니다.

Copy link
Member

@gnujoow gnujoow left a comment

Choose a reason for hiding this comment

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

line diff가 잇는것 같습니다. 원문의 경우 443행인데 번역후에는 444행이네요 line diff만 해결해주시면 나머지는 좋은것 같습니다 감사합니다.

@h2ck4u
Copy link
Contributor Author

h2ck4u commented Jan 6, 2022

@gnujoow
해결하였습니다 감사합니다 : )

@gnujoow gnujoow merged commit 30ac5ee into reactjs:main Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta needs review Needs review A pull request ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants