-
Notifications
You must be signed in to change notification settings - Fork 176
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
Translate React 17 RC blog #349
Conversation
Deploy preview for ja-reactjs ready! Built with commit e433cf7 |
6293fd7
to
12b282f
Compare
|
||
React has been doing event delegation automatically since its first release. When a DOM event fires on the document, React figures out which component to call, and then the React event "bubbles" upwards through your components. But behind the scenes, the native event has already bubbled up to the `document` level, where React installs its event handlers. | ||
React は最初のリリース時点からこのようなイベントデリゲーションを自動的に行っていました。ドキュメントで DOM イベントが発生すると、React はどのコンポーネントを呼び出すべきか判定し、React のイベントがあなたのコンポーネントツリー内を上側に向かって「バブリング」していきます。しかしその裏側では、この時点でネイティブのイベントが既に `document` のレベルにバブリングし終わっているのであり、そこに React はイベントハンドラを仕込んでいるのです。 |
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.
イベントをバブリングさせることを「コンポーネントをコールする」とは普通言わないと思うので、"which component to call" をどうするか困っています。文脈的には「イベントの発生源となったコンポーネントを判定し」とか「どのコンポーネントが関連するか特定し」などとすればしっくり来ますが…。
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.
今のままでも言いたいことは理解出来るので、このままでもいいかなと思いました。
12b282f
to
f28a244
Compare
f28a244
to
a44be35
Compare
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.
👍 ありがとうございます!一点だけコメントしましたが問題なさそうです!
Co-authored-by: Toru Kobayashi <koba0004@gmail.com>
No description provided.