Skip to content

Commit 95d2dc4

Browse files
committed
Translate up to line 167
1 parent ae38a69 commit 95d2dc4

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
@@ -105,7 +105,7 @@ const MyInput = forwardRef(function MyInput(props, ref) {
105105
});
106106
```
107107
108-
Now, if the parent component gets a ref to `MyInput`, it will be able to call the `focus` and `scrollIntoView` methods on it. However, it will not have full access to the underlying `<input>` DOM node.
108+
これで、親コンポーネントが `MyInput` への ref を取得し、そのコンポーネントで `focus` メソッドと `scrollIntoView` メソッドを呼び出すことができるようになります。ただし、親コンポーネントは基礎となる `<input>` DOM ノードへの完全なアクセス権は持ちません。
109109
110110
<Sandpack>
111111
@@ -118,7 +118,7 @@ export default function Form() {
118118

119119
function handleClick() {
120120
ref.current.focus();
121-
// This won't work because the DOM node isn't exposed:
121+
// DOM ノードが公開されていないため、これでは機能しません。
122122
// ref.current.style.opacity = 0.5;
123123
}
124124

0 commit comments

Comments
 (0)