Skip to content

Commit cb17ceb

Browse files
committed
Translate up to line 282
1 parent 95d2dc4 commit cb17ceb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/content/reference/react/useImperativeHandle.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ input {
166166
167167
---
168168
169-
### Exposing your own imperative methods {/*exposing-your-own-imperative-methods*/}
169+
### 独自の命令型メソッドを公開する {/*exposing-your-own-imperative-methods*/}
170170
171-
The methods you expose via an imperative handle don't have to match the DOM methods exactly. For example, this `Post` component exposes a `scrollAndFocusAddComment` method via an imperative handle. This lets the parent `Page` scroll the list of comments *and* focus the input field when you click the button:
171+
命令型ハンドルを介して公開するメソッドは、DOM メソッドと正確に一致する必要はありません。例えば、この `Post` コンポーネントは、命令型ハンドルを介して `scrollAndFocusAddComment` メソッドを公開します。これにより、ボタンをクリックすると、親である `Page` がコメントのリストをスクロールできる*だけでなく*、入力フィールドにフォーカスもできるようになります。
172172
173173
<Sandpack>
174174

0 commit comments

Comments
 (0)