Skip to content

Translate Suspense for Data Fetching - #278

Merged
smikitky merged 6 commits into
masterfrom
tr/concurrent-suspense
Dec 26, 2019
Merged

smikitky merged 6 commits into
masterfrom
tr/concurrent-suspense

Conversation

@smikitky

Copy link
Copy Markdown
Member

concurrent-mode-suspense.md の翻訳です

@smikitky
smikitky requested review from koba04 and potato4d November 26, 2019 03:00
@smikitky smikitky mentioned this pull request Nov 26, 2019
5 tasks done
@netlify

netlify Bot commented Nov 26, 2019 •

Copy link
Copy Markdown

* データ取得の早期開始を明示するのが難しいことがある。ウォーターフォールを避けるため、そこを簡単にできるか?
* あるページのデータを取得する時に、そのページ*から*即座に遷移できるためのデータを含めるよう API が仕向けるべきか?
* レスポンスのライフタイムは? キャッシュはグローバル、あるいはローカルであるべきか? キャッシュをだれが管理するのか?
* Proxy を使うことで、あちこちに `read()` を挿入せずとも遅延ロード API を表現することが可能か?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ここでの Proxy がどういうものなのか分かっていませんがとりあえずそのままにしてあります

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ES2015のProxyを指しているのかなと思いました。そのままでよさそうです。

**[CodeSandbox で試す](https://codesandbox.io/s/trusting-clarke-8twuq)**

This code is deceptively easy to read.
これは見かけほど簡単ではありません。

@smikitky smikitky Nov 26, 2019 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

普通に英語として意味がピンときていません…

辺りを総合すると、ネイティブスピーカーでも意見が分かれる(通常は避けるべき)表現であり、

  1. 見かけは簡単だが実際は難しい
  2. 見かけが難しいだけで実際は簡単だ

のどちらの意味にもとれるそうなのですが、今回はどちらの解釈も文脈にあまり合致しない気がします(どう見てもクラスの方が関数コンポーネントより煩雑ですから1は妙だし、2のようにクラスコンポーネントを急に褒め出すのも違和感があります)。

もうちょっと皮肉っぽいニュアンスで「簡単という人もいそうですが決してそんなわけないですよね」あるいは「思ってたより簡単(笑)でしたね」みたいな話なら分かる気もしますが、当てずっぽうです。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

難しいですね...。個人的には2なのかなと思いました。
クラスコンポーネントの場合、コードが増えて複雑に見えるけど、やっていることは単純だという。
ただ、あまり自信はないです。

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

確かに2の方向でも通じる気がしてきたのでそのようにします!

1. ユーザ詳細情報の取得を開始
2. 待機する…
3. ユーザ詳細情報の取得が完了
4. タイムライン投稿 (posts) の取得を開始

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

読みやすさのため一部の「投稿」を「タイムライン投稿」としました(以下同様)。

@koba04 koba04 self-assigned this Dec 3, 2019

@koba04 koba04 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 翻訳ありがとうございます!!! いくつかコメントしましたので確認お願いします!

* データ取得の早期開始を明示するのが難しいことがある。ウォーターフォールを避けるため、そこを簡単にできるか?
* あるページのデータを取得する時に、そのページ*から*即座に遷移できるためのデータを含めるよう API が仕向けるべきか?
* レスポンスのライフタイムは? キャッシュはグローバル、あるいはローカルであるべきか? キャッシュをだれが管理するのか?
* Proxy を使うことで、あちこちに `read()` を挿入せずとも遅延ロード API を表現することが可能か?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ES2015のProxyを指しているのかなと思いました。そのままでよさそうです。

**[CodeSandbox で試す](https://codesandbox.io/s/trusting-clarke-8twuq)**

This code is deceptively easy to read.
これは見かけほど簡単ではありません。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

難しいですね...。個人的には2なのかなと思いました。
クラスコンポーネントの場合、コードが増えて複雑に見えるけど、やっていることは単純だという。
ただ、あまり自信はないです。

@koba04 koba04 removed their assignment Dec 8, 2019
@smikitky
smikitky requested a review from koba04 December 11, 2019 04:55

@koba04 koba04 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 対応ありがとうございます!!!

@smikitky
smikitky merged commit 0a9573a into master Dec 26, 2019
@smikitky
smikitky deleted the tr/concurrent-suspense branch December 26, 2019 10:03
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.

2 participants