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 "Synchronizing with Effects" #594

Merged
merged 1 commit into from
Jun 19, 2023
Merged

Conversation

smikitky
Copy link
Member

Synchronizing with Effects 翻訳です

@github-actions
Copy link

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌


</Hint>

<Solution>

Put the conditional logic inside the Effect. You will need to specify `shouldFocus` as a dependency because you are using it inside the Effect. (This means that if some input's `shouldFocus` changes from `false` to `true`, it will focus after mount.)
条件付きのロジックはエフェクトの中に入れます。エフェクトの中で `shouldFocus` を使用しているため、依存関係として `shouldFocus` を指定する必要があります。(これは、ある入力欄の `shouldFocus` `false` から `true` に変わった場合、フォーカスが当たるということでもあります。)
Copy link
Member Author

Choose a reason for hiding this comment

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

"after mount" は原文のミスくさいので訳してありません

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.

👍 LGTM!!!

@smikitky smikitky merged commit ca70eeb into main Jun 19, 2023
@smikitky smikitky deleted the tr/sync-with-effects branch June 19, 2023 23:44
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