Skip to content

Commit f594935

Browse files
committed
doc: Translate Ref section
1 parent 775dc47 commit f594935

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

content/docs/reference-glossary.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,9 @@ React によって値が制御される入力フォーム要素は *制御され
153153
## [Refs](/docs/refs-and-the-dom.html)
154154

155155
React は任意のコンポーネントに追加できる特別な属性をサポートしています。
156+
`ref` 属性は、 [`React.createRef()` 関数](/docs/react-api.html#reactcreateref) によって生成されたオブジェクト、あるいはそのコールバック関数や文字列(古い API)です。 `ref` 属性がコールバック関数の場合、その関数は引数として(要素の型次第で)DOM 要素またはクラスインスタンスを受け取ります。これによって、 DOM 要素またはコンポーネントのインスタンスへと直接アクセスできます。
156157

157-
The `ref` attribute can be an object created by [`React.createRef()` function](/docs/react-api.html#reactcreateref) or a callback function, or a string (in legacy API). When the `ref` attribute is a callback function, the function receives the underlying DOM element or class instance (depending on the type of element) as its argument. This allows you to have direct access to the DOM element or component instance.
158-
159-
Use refs sparingly. If you find yourself often using refs to "make things happen" in your app, consider getting more familiar with [top-down data flow](/docs/lifting-state-up.html).
158+
refs は消極的に利用してください。アプリケーション内で何かを実行するために refs を頻繁に使用している場合、[トップダウンのデータフロー](/docs/lifting-state-up.html)に慣れ親しむことを検討してください。
160159

161160
## [イベント](/docs/handling-events.html)
162161

0 commit comments

Comments
 (0)