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

Translate React 17 RC blog #349

Merged
merged 2 commits into from
Aug 21, 2020
Merged

Translate React 17 RC blog #349

merged 2 commits into from
Aug 21, 2020

Conversation

smikitky
Copy link
Member

No description provided.

@netlify
Copy link

netlify bot commented Aug 21, 2020

Deploy preview for ja-reactjs ready!

Built with commit e433cf7

https://deploy-preview-349--ja-reactjs.netlify.app

@smikitky smikitky force-pushed the tr/blog20200810 branch 2 times, most recently from 6293fd7 to 12b282f Compare August 21, 2020 02:44

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 はイベントハンドラを仕込んでいるのです。
Copy link
Member Author

@smikitky smikitky Aug 21, 2020

Choose a reason for hiding this comment

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

イベントをバブリングさせることを「コンポーネントをコールする」とは普通言わないと思うので、"which component to call" をどうするか困っています。文脈的には「イベントの発生源となったコンポーネントを判定し」とか「どのコンポーネントが関連するか特定し」などとすればしっくり来ますが…。

Copy link
Member

Choose a reason for hiding this comment

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

今のままでも言いたいことは理解出来るので、このままでもいいかなと思いました。

@smikitky smikitky marked this pull request as ready for review August 21, 2020 03:05
Copy link
Member

@koba04 koba04 left a 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>
@smikitky smikitky merged commit 601dfca into master Aug 21, 2020
@smikitky smikitky deleted the tr/blog20200810 branch August 21, 2020 21:12
@smikitky smikitky mentioned this pull request Aug 26, 2020
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.

None yet

2 participants