-
Notifications
You must be signed in to change notification settings - Fork 183
Translate "useCallback" hook reference #591
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Size changes📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
ありがとうございます。次回以降 #452 で先に宣言していただけると助かります。 |
c41e694
to
de34623
Compare
Markdown パースや textlint 絡みの問題があるので、
|
すみません、偶然今エフェクト関係の記事を翻訳していて痛感したのですが、 https://github.com/reactjs/ja.react.dev/wiki/%E8%A8%B3%E8%AA%9E%E3%81%AE%E7%B5%B1%E4%B8%80 一旦、こちらに書いた方針で見直しをお願いできないでしょうか。 useEffect リファレンスの翻訳をしていた時はこの辺をよく考えておらず、「オブジェクトの不要な依存関係を削除する」みたいな、今見返したら何を言っているのかピンと来ない翻訳を自分がしてしまっているのですが、こういうのも「オブジェクト型の不要な依存値を削除する」と具体的に言った方が良い気がしています。(そちらは #585 と併せてこちらで修正します) |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
遅くなりましたが確認しました。明らかな誤訳みたいなのは少ないのですが、少しでも読みやすくするための suggestion の量が多めです。確認をよろしくお願いします。
なお新ドキュメントから「副作用」は「エフェクト」とすることにしました (#585)。
Co-authored-by: Soichiro Miki <smiki-tky@umin.ac.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smikitky ありがとうございます。たくさんの suggestion、お手数をおかけしました。
|
||
If you're already familiar with [`useMemo`,](/reference/react/useMemo) you might find it helpful to think of `useCallback` as this: | ||
* **`useCallback` は*関数自体*をキャッシュします**。`useMemo`とは異なり、あなたが提供する関数を呼び出しません。代わりに、あなたが提供した関数をキャッシュして、`productId` または `referrer` が変更されない限り、`handleSubmit` *自体*が変更されないようにします。これにより、`ShippingForm` を不必要に再レンダーすることなく、`handleSubmit` 関数を下位に渡すことができます。ユーザーがフォームを送信するまであなたのコードは実行されません。 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
999a17d こちらで対応しました。
Co-authored-by: Naoki Sekiguchi <likealunatic@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
提案はそのままコミットしておきました。ありがとうございました!
2 人のレビューが必要ですのでこのままお待ち頂ければ幸いです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 ありがとうございます!
#573 に引き続いて2つ目の翻訳です。