-
Notifications
You must be signed in to change notification settings - Fork 184
Translate react-dom #45
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b8f5861
translate reference-react-dom
gotchane facce61
trim half-width space after punctuation
gotchane c52edf0
fix translation of note
gotchane 67b9614
fix translations pointed out
gotchane e69d6c2
fix a bit
gotchane 53eecd2
Apply suggestions from code review
koba04 313e88d
Apply suggestions from code review
smikitky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,53 +6,53 @@ category: Reference | |||||
| permalink: docs/react-dom.html | ||||||
| --- | ||||||
|
|
||||||
| If you load React from a `<script>` tag, these top-level APIs are available on the `ReactDOM` global. If you use ES6 with npm, you can write `import ReactDOM from 'react-dom'`. If you use ES5 with npm, you can write `var ReactDOM = require('react-dom')`. | ||||||
| `<script>` タグから React をロードすると、以下のトップレベル API をグローバル変数 `ReactDOM` で使用することができます。npm と ES6 を使用している場合は、`import ReactDOM from 'react-dom'` と記述できます。npm と ES5 を使用している場合は、`var ReactDOM = require('react-dom')` と記述できます。 | ||||||
|
|
||||||
| ## Overview | ||||||
| ## 概要 | ||||||
|
|
||||||
| The `react-dom` package provides DOM-specific methods that can be used at the top level of your app and as an escape hatch to get outside of the React model if you need to. Most of your components should not need to use this module. | ||||||
| `react-dom` パッケージには、アプリケーションのトップレベルで、また必要に応じて React モデルから抜け出すための避難ハッチとして使用できる DOM 固有のメソッドが用意されています。ほとんどのコンポーネントでは、このモジュールを使用する必要はないはずです。 | ||||||
|
|
||||||
| - [`render()`](#render) | ||||||
| - [`hydrate()`](#hydrate) | ||||||
| - [`unmountComponentAtNode()`](#unmountcomponentatnode) | ||||||
| - [`findDOMNode()`](#finddomnode) | ||||||
| - [`createPortal()`](#createportal) | ||||||
|
|
||||||
| ### Browser Support | ||||||
| ### ブラウザサポート | ||||||
|
|
||||||
| React supports all popular browsers, including Internet Explorer 9 and above, although [some polyfills are required](/docs/javascript-environment-requirements.html) for older browsers such as IE 9 and IE 10. | ||||||
| React は Internet Explorer 9 以降を含む全ての一般的なブラウザをサポートしていますが、IE 9 や IE 10 といった古いブラウザでは[一部のポリフィルが必要です](/docs/javascript-environment-requirements.html)。 | ||||||
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| > Note | ||||||
| > 補足 | ||||||
| > | ||||||
| > We don't support older browsers that don't support ES5 methods, but you may find that your apps do work in older browsers if polyfills such as [es5-shim and es5-sham](https://github.com/es-shims/es5-shim) are included in the page. You're on your own if you choose to take this path. | ||||||
| > React は ES5 をサポートしていない古いブラウザをサポートしていませんが、ページ内に [es5-shim や es5-sham](https://github.com/es-shims/es5-shim) のようなポリフィルが含まれている場合、古いブラウザでもアプリケーションが動作することがあります。この手段を選択するかどうかは自己責任で判断してください。 | ||||||
|
|
||||||
| * * * | ||||||
|
|
||||||
| ## Reference | ||||||
| ## リファレンス | ||||||
|
|
||||||
| ### `render()` | ||||||
|
|
||||||
| ```javascript | ||||||
| ReactDOM.render(element, container[, callback]) | ||||||
| ``` | ||||||
|
|
||||||
| Render a React element into the DOM in the supplied `container` and return a [reference](/docs/more-about-refs.html) to the component (or returns `null` for [stateless components](/docs/components-and-props.html#functional-and-class-components)). | ||||||
| 渡された `container` の DOM に React 要素をレンダーし、コンポーネントへの[参照](/docs/more-about-refs.html)([ステートレスコンポーネント](/docs/components-and-props.html#functional-and-class-components)の場合は `null`)を返します。 | ||||||
|
|
||||||
| If the React element was previously rendered into `container`, this will perform an update on it and only mutate the DOM as necessary to reflect the latest React element. | ||||||
| React 要素がすでに `container` にレンダーされている場合は更新を行い、最新の React 要素を反映するために必要な DOM のみを変更します。 | ||||||
|
|
||||||
| If the optional callback is provided, it will be executed after the component is rendered or updated. | ||||||
| オプションのコールバックが渡されている場合は、コンポーネントがレンダーまたは更新された後に実行されます。 | ||||||
|
|
||||||
| > Note: | ||||||
| > 補足: | ||||||
| > | ||||||
| > `ReactDOM.render()` controls the contents of the container node you pass in. Any existing DOM elements inside are replaced when first called. Later calls use React’s DOM diffing algorithm for efficient updates. | ||||||
| > `ReactDOM.render()` は与えられたコンテナの内容を制御します。コンテナ内部のあらゆる既存の DOM 要素は、最初に呼び出された時に置き換えられます。後続する呼び出しでは効率的な更新のために React の DOM 差分アルゴリズムを使用します。 | ||||||
| > | ||||||
| > `ReactDOM.render()` does not modify the container node (only modifies the children of the container). It may be possible to insert a component to an existing DOM node without overwriting the existing children. | ||||||
| > `ReactDOM.render()` はコンテナノードを変更しません(コンテナの子要素のみ変更します)。既存の子要素を上書きせずに既存の DOM ノードをコンポーネントに挿入することが可能な場合があります。 | ||||||
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| > | ||||||
| > `ReactDOM.render()` currently returns a reference to the root `ReactComponent` instance. However, using this return value is legacy | ||||||
| > and should be avoided because future versions of React may render components asynchronously in some cases. If you need a reference to the root `ReactComponent` instance, the preferred solution is to attach a | ||||||
| > [callback ref](/docs/more-about-refs.html#the-ref-callback-attribute) to the root element. | ||||||
| > `ReactDOM.render()` は現時点ではルートの `ReactComponent` インスタンスへの参照を返します。 | ||||||
| > しかし、この戻り値を使用する方法は古く、将来のバージョンの React では一部のケースで非同期にコンポーネントをレンダーするようになる可能性があるため、使用は避けるべきです。 | ||||||
| > ルートの `ReactComponent` インスタンスへの参照が必要な場合は、ルート要素に[コールバックの ref](/docs/more-about-refs.html#the-ref-callback-attribute) を追加することを推奨します。 | ||||||
| > | ||||||
| > Using `ReactDOM.render()` to hydrate a server-rendered container is deprecated and will be removed in React 17. Use [`hydrate()`](#hydrate) instead. | ||||||
| > サーバーで描画されたコンテナをクライアントと合わせるために `ReactDOM.render()` を使用することは非推奨となり、React 17 では削除されます。代わりに [`hydrate()`](#hydrate) を使用してください。 | ||||||
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| > サーバーで描画されたコンテナをクライアントと合わせるために `ReactDOM.render()` を使用することは非推奨となり、React 17 では削除されます。代わりに [`hydrate()`](#hydrate) を使用してください。 | |
| > サーバで描画されたコンテナをクライアントと合わせるために `ReactDOM.render()` を使用することは非推奨となり、React 17 では削除されます。代わりに [`hydrate()`](#hydrate) を使用してください。 |
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
gotchane marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.