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 Virtual DOM and Internals #132

Merged
merged 2 commits into from
Feb 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions content/docs/faq-internals.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
id: faq-internals
title: Virtual DOM and Internals
title: 仮想 DOM と内部処理
permalink: docs/faq-internals.html
layout: docs
category: FAQ
---

### What is the Virtual DOM? {#what-is-the-virtual-dom}
### 仮想 DOM とは? {#what-is-the-virtual-dom}

The virtual DOM (VDOM) is a programming concept where an ideal, or "virtual", representation of a UI is kept in memory and synced with the "real" DOM by a library such as ReactDOM. This process is called [reconciliation](/docs/reconciliation.html).
仮想 DOM (virtual DOM; VDOM) は、インメモリに保持された想像上のまたは「仮想の」UI 表現が、ReactDOM のようなライブラリによって「実際の」DOM と同期されるというプログラミング上の概念です。このプロセスは[差分検出処理 (reconciliation)](/docs/reconciliation.html)と呼ばれます。

This approach enables the declarative API of React: You tell React what state you want the UI to be in, and it makes sure the DOM matches that state. This abstracts out the attribute manipulation, event handling, and manual DOM updating that you would otherwise have to use to build your app.
このアプローチにより React の宣言型 API が可能になっています。あなたは UI をどのような状態にしたいのか React に伝え、React は必ず DOM をその状態と一致させます。これにより、React なしではアプリケーションを構築するために避けて通れない属性の操作やイベントハンドリング、および手動での DOM 更新が抽象化されます。

Since "virtual DOM" is more of a pattern than a specific technology, people sometimes say it to mean different things. In React world, the term "virtual DOM" is usually associated with [React elements](/docs/rendering-elements.html) since they are the objects representing the user interface. React, however, also uses internal objects called "fibers" to hold additional information about the component tree. They may also be considered a part of "virtual DOM" implementation in React.
"仮想 DOM" は特定の技術というよりむしろ 1 つのパターンなので、時たま違う意味で使われることがあります。React の世界において "仮想 DOM" という用語は通常、ユーザインタフェースを表現するオブジェクトである [React 要素](/docs/rendering-elements.html) と結びつけて考えられます。React は一方で、コンポーネントツリーに関する追加情報を保持するため "ファイバー (fiber)" と呼ばれる内部オブジェクトも使用します。これらも React における "仮想 DOM" 実装の一部と見なすことができます。

### Is the Shadow DOM the same as the Virtual DOM? {#is-the-shadow-dom-the-same-as-the-virtual-dom}
### Shadow DOM は仮想 DOM と同じもの? {#is-the-shadow-dom-the-same-as-the-virtual-dom}

No, they are different. The Shadow DOM is a browser technology designed primarily for scoping variables and CSS in web components. The virtual DOM is a concept implemented by libraries in JavaScript on top of browser APIs.
いいえ、違います。Shadow DOM は、本来 web components において変数や CSS をスコープ化するために設計されたブラウザ技術です。仮想 DOM JavaScript のライブラリによってブラウザ API の上に実装された概念です。

### What is "React Fiber"? {#what-is-react-fiber}
### React Fiber」とは? {#what-is-react-fiber}

Fiber is the new reconciliation engine in React 16. Its main goal is to enable incremental rendering of the virtual DOM. [Read more](https://github.com/acdlite/react-fiber-architecture).
Fiber React 16 の新しい差分検出処理エンジンです。その主な目的は仮想 DOM の逐次レンダーを可能にすることです。[さらに読む](https://github.com/acdlite/react-fiber-architecture)