Uh oh!
There was an error while loading. Please reload this page.
Translate react-dom - #45
Conversation
sasurau4
left a comment
There was a problem hiding this comment.
ありがとうございます 👍
ほとんど、スタイルに関する指摘です。修正よろしくお願いします。
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
gotchane
commented
Feb 3, 2019
sasurau4
commented
Feb 3, 2019
LGTM 🚀 |
gotchane
commented
Feb 5, 2019
見返して気づいた修正点を少し修正しました。 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: gotchane <20318418+gotchane@users.noreply.github.com>
gotchane
commented
Feb 6, 2019
@koba04 |
There was a problem hiding this comment.
確認をお願いします。
hydrate は直訳すると「水分を与える」(水素 hydrogen と同じ語源)ですが、要するに「入れ物(コンテナdiv)に中身を注ぐ」、もっと端的に言うとSSRにおいては単にコンテナに(HTMLに変換される)コンテンツを書き込むことだと思います。hydrate 自体に「再利用する」という意味はありません。しかも SSR 特有の単語かと思いきや、クライアント側のコードの render に対してまで hydrate を使っている文が2か所あり(これは原文が不親切)、その場合は「(初回)レンダー」と換言しても問題ないと思います。
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| > ルートの `ReactComponent` インスタンスへの参照が必要な場合は、ルート要素に[コールバックの ref](/docs/more-about-refs.html#the-ref-callback-attribute) を追加することを推奨します。 | ||
| > | ||
| > Using `ReactDOM.render()` to hydrate a server-rendered container is deprecated and will be removed in React 17. Use [`hydrate()`](#hydrate) instead. | ||
| > サーバで描画されたコンテナをクライアントで再利用するために `ReactDOM.render()` を使用することは非推奨となり、React 17 では削除されます。代わりに [`hydrate()`](#hydrate) を使用してください。 |
There was a problem hiding this comment.
| > サーバで描画されたコンテナをクライアントで再利用するために`ReactDOM.render()` を使用することは非推奨となり、React 17 では削除されます。代わりに [`hydrate()`](#hydrate) を使用してください。 | |
| > サーバで描画されたコンテナにコンテンツを書き込むために`ReactDOM.render()` を使用することは非推奨となり、React 17 では削除されます。代わりに [`hydrate()`](#hydrate) を使用してください。 |
原文に近づけたつもりですが、これはどちらでもいいです
There was a problem hiding this comment.
挙動をイメージしやすいように実際の挙動からこの訳を出しましたが、指摘の通り原文の単語にこの意味はないので、どちらを取るかですね。
There was a problem hiding this comment.
こちらは挙動のイメージのしやすさを踏まえ、「再利用する」のままにしますね。
| ``` | ||
| Same as [`render()`](#render), but is used to hydrate a container whose HTML contents were rendered by [`ReactDOMServer`](/docs/react-dom-server.html). React will attempt to attach event listeners to the existing markup. | ||
| [`render()`](#render) と同様ですが、[`ReactDOMServer`](/docs/react-dom-server.html) により HTML コンテンツが描画されたコンテナをクライアントで再利用するために使用されます。React は既存のマークアップにイベントリスナをアタッチしようとします。 |
There was a problem hiding this comment.
| [`render()`](#render) と同様ですが、[`ReactDOMServer`](/docs/react-dom-server.html)により HTML コンテンツが描画されたコンテナをクライアントで再利用するために使用されます。React は既存のマークアップにイベントリスナをアタッチしようとします。 | |
| [`render()`](#render) と同様ですが、[`ReactDOMServer`](/docs/react-dom-server.html)によって HTML コンテンツが描画されるコンテナに書き込むために使用されます。React は既存のマークアップにイベントリスナをアタッチしようとします。 |
There was a problem hiding this comment.
「書き込む」だと、ReactDOM.hydrate()のタイミングで何かDOM更新するように受け取られるのではと感じたのですが如何でしょう?
原文かつ挙動にあった言葉が思い浮かばないですが...。
There was a problem hiding this comment.
すみません SSR は殆ど素人なので実際の挙動に合っているようでしたら元の文で大丈夫です
There was a problem hiding this comment.
「注入する」「賦活する」あたりの言葉も浮かびましたがどうせ意味不明になりそう…
Uh oh!
There was an error while loading. Please reload this page.
koba04
commented
Feb 6, 2019
hydrateについては、SSRで構築されたDOMに「動きを与える」(React Elementを構築してイベントリストを設定するなど)と理解しています。 |
smikitky
commented
Feb 6, 2019
なるほど、hydrate とは render の一部なんですね…とりあえずクライアントの render を指している部分についての修正ができていれば、SSR側については分かりやすく訳せていれば大丈夫だと思います。 |
Co-Authored-By: gotchane <20318418+gotchane@users.noreply.github.com>
gotchane
commented
Feb 6, 2019
koba04
commented
Feb 6, 2019
@gotchane mergeしました 🚀 ありがとうございます 👏👏👏 |
gotchane
commented
Feb 7, 2019
ありがとうございました 🚀 🚀 🚀 |
This PR is a part of #4.
Translation: https://reactjs.org/docs/react-dom.html
Please review 🙏