From 9961290fb0194ffed1f0754a91db166394780e75 Mon Sep 17 00:00:00 2001 From: Alexander_Zhao Date: Tue, 26 Feb 2019 01:12:42 +0800 Subject: [PATCH 01/14] finished translating para 1 and 2 --- content/docs/faq-internals.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index da7f96be08..33a64abda9 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -1,16 +1,18 @@ --- 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 是一种编程概念。在这个概念里,一种想象的,或者说“虚拟的” UI 呈现会被保存于内存中,并借助如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫作[协调](/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:您告诉 React 想让 UI 是什么状态,React 就确保 DOM 是什么状态。 这抽象出了您在构建程序时必须用到的属性操作、事件处理和手动 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. From 2cba1d3d1524460a6a55e89721bf93a4c0256ec0 Mon Sep 17 00:00:00 2001 From: Alexander_Zhao Date: Tue, 26 Feb 2019 13:04:18 +0800 Subject: [PATCH 02/14] finished translating para 3 and 4 --- content/docs/faq-internals.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index 33a64abda9..d1f40dabde 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -9,17 +9,20 @@ category: FAQ ### 什么是虚拟 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 是一种编程概念。在这个概念里,一种想象的,或者说“虚拟的” UI 呈现会被保存于内存中,并借助如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫作[协调](/docs/reconciliation.html). +虚拟 DOM 是一种编程概念。在这个概念里,一种想象的,或者说“虚拟的” UI 会被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/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:您告诉 React 想让 UI 是什么状态,React 就确保 DOM 是什么状态。 这抽象出了您在构建程序时必须用到的属性操作、事件处理和手动 DOM 更新。 +这种方式使用了 React 的声明式 API:您告诉 React 希望让 UI 是什么状态,React 就确保 DOM 匹配该状态。这抽象出了您在构建应用程序时必须用到的属性操作、事件处理和手动 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”相比于特定的技术更像是一种模式,有时我们说它时也代表不同的含义。在 React 世界里,“虚拟 DOM”术语通常与[React 元素](/docs/rendering-elements.html)关联在一起,因为它们都是呈现 UI 的对象。而 React 也使用一个名为“ fibers ”的内部对象来存放组件树的其他信息。上述二者也被认为是 React 中“虚拟 DOM ”实现的一部分。 -### Is the Shadow DOM the same as the Virtual DOM? {#is-the-shadow-dom-the-same-as-the-virtual-dom} +### 影子 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. +不,他们不一样。影子 DOM 是一种浏览器技术,主要用于在 web 组件中封装变量和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 is the new reconciliation engine in React 16. Its main goal is to enable incremental rendering of the virtual DOM. +Fiber 是 React 16 中新的协调引擎. 它的主要目的是使虚拟 DOM 可以进行增量式渲染。[了解更多](https://github.com/acdlite/react-fiber-architecture). From 4d5fa144700cc5c43c995da92e38373a7d08811a Mon Sep 17 00:00:00 2001 From: AlexanderZhao Date: Tue, 26 Feb 2019 16:06:13 +0800 Subject: [PATCH 03/14] altered wording --- content/docs/faq-internals.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index d1f40dabde..9e63be2af2 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -8,21 +8,16 @@ category: FAQ ### 什么是虚拟 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 是一种编程概念。在这个概念里,一种想象的,或者说“虚拟的” UI 会被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/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:您告诉 React 希望让 UI 是什么状态,React 就确保 DOM 匹配该状态。这抽象出了您在构建应用程序时必须用到的属性操作、事件处理和手动 DOM 更新。 +这种方式采用了 React 的声明式 API:您告诉 React 希望让 UI 是什么状态,React 就确保 DOM 匹配该状态。这使您在构建应用程序时,省去了属性操作、事件处理和手动 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”相比于特定的技术更像是一种模式,有时我们说它时也代表不同的含义。在 React 世界里,“虚拟 DOM”术语通常与[React 元素](/docs/rendering-elements.html)关联在一起,因为它们都是呈现 UI 的对象。而 React 也使用一个名为“ fibers ”的内部对象来存放组件树的其他信息。上述二者也被认为是 React 中“虚拟 DOM ”实现的一部分。 +由于“虚拟 DOM”相比于特定的技术更像是一种模式,我们提到它有时也代表不同的含义。在 React 世界里,术语“虚拟 DOM”通常与[React 元素](/docs/rendering-elements.html)关联在一起,因为它们都是呈现 UI 的对象。而 React 也使用一个名为“fibers”的内部对象来存放组件树的其他信息。上述二者也被认为是 React 中“虚拟 DOM ”实现的一部分。 ### 影子 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. -不,他们不一样。影子 DOM 是一种浏览器技术,主要用于在 web 组件中封装变量和CSS。虚拟 DOM 则是由 Javascript 类库基于浏览器 API 实现的概念。 +不,他们不一样。影子 DOM 是一种浏览器技术,主要用于在 web 组件中封装变量和CSS。虚拟 DOM 则是一种概念,由 Javascript 类库基于浏览器 API 实现。 ### 什么是“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. -Fiber 是 React 16 中新的协调引擎. 它的主要目的是使虚拟 DOM 可以进行增量式渲染。[了解更多](https://github.com/acdlite/react-fiber-architecture). +Fiber 是 React 16 中新的协调引擎。它的主要目的是使虚拟 DOM 可以进行增量式渲染。[了解更多](https://github.com/acdlite/react-fiber-architecture). From 059bae2fdfc378b6ed0ef5843901f1443f119078 Mon Sep 17 00:00:00 2001 From: AlexanderZhao Date: Tue, 26 Feb 2019 16:14:13 +0800 Subject: [PATCH 04/14] use Chinese character of question mark --- content/docs/faq-internals.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index 9e63be2af2..71dbf79fa5 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -6,7 +6,7 @@ layout: docs category: FAQ --- -### 什么是虚拟 DOM? {#what-is-the-virtual-dom} +### 什么是虚拟 DOM? {#what-is-the-virtual-dom} 虚拟 DOM 是一种编程概念。在这个概念里,一种想象的,或者说“虚拟的” UI 会被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/docs/reconciliation.html). @@ -14,10 +14,10 @@ category: FAQ 由于“虚拟 DOM”相比于特定的技术更像是一种模式,我们提到它有时也代表不同的含义。在 React 世界里,术语“虚拟 DOM”通常与[React 元素](/docs/rendering-elements.html)关联在一起,因为它们都是呈现 UI 的对象。而 React 也使用一个名为“fibers”的内部对象来存放组件树的其他信息。上述二者也被认为是 React 中“虚拟 DOM ”实现的一部分。 -### 影子 DOM 和虚拟 DOM 是一回事吗? {#is-the-shadow-dom-the-same-as-the-virtual-dom} +### 影子 DOM 和虚拟 DOM 是一回事吗? {#is-the-shadow-dom-the-same-as-the-virtual-dom} -不,他们不一样。影子 DOM 是一种浏览器技术,主要用于在 web 组件中封装变量和CSS。虚拟 DOM 则是一种概念,由 Javascript 类库基于浏览器 API 实现。 +不,他们不一样。影子 DOM 是一种浏览器技术,主要用于在 web 组件中封装变量和 CSS。虚拟 DOM 则是一种概念,由 Javascript 类库基于浏览器 API 实现。 -### 什么是“React Fiber”? {#what-is-react-fiber} +### 什么是“React Fiber”? {#what-is-react-fiber} Fiber 是 React 16 中新的协调引擎。它的主要目的是使虚拟 DOM 可以进行增量式渲染。[了解更多](https://github.com/acdlite/react-fiber-architecture). From 975acfa8b1644d861eac8f11634f2220b9ba3f05 Mon Sep 17 00:00:00 2001 From: AlexanderZhao Date: Tue, 26 Feb 2019 16:25:01 +0800 Subject: [PATCH 05/14] use Chinese character of full stop --- content/docs/faq-internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index 71dbf79fa5..16adb7462c 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -8,7 +8,7 @@ category: FAQ ### 什么是虚拟 DOM? {#what-is-the-virtual-dom} -虚拟 DOM 是一种编程概念。在这个概念里,一种想象的,或者说“虚拟的” UI 会被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/docs/reconciliation.html). +虚拟 DOM 是一种编程概念。在这个概念里,一种想象的,或者说“虚拟的” UI 会被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/docs/reconciliation.html)。 这种方式采用了 React 的声明式 API:您告诉 React 希望让 UI 是什么状态,React 就确保 DOM 匹配该状态。这使您在构建应用程序时,省去了属性操作、事件处理和手动 DOM 更新。 From e2b8f02f7fbf3c147b7333db9a3cc05e26bead7d Mon Sep 17 00:00:00 2001 From: Alan Zhang Date: Sat, 23 Mar 2019 23:59:38 +0800 Subject: [PATCH 06/14] Update content/docs/faq-internals.md Co-Authored-By: ChiuMungZitAlexander --- content/docs/faq-internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index 16adb7462c..1977c80fb0 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -16,7 +16,7 @@ category: FAQ ### 影子 DOM 和虚拟 DOM 是一回事吗? {#is-the-shadow-dom-the-same-as-the-virtual-dom} -不,他们不一样。影子 DOM 是一种浏览器技术,主要用于在 web 组件中封装变量和 CSS。虚拟 DOM 则是一种概念,由 Javascript 类库基于浏览器 API 实现。 +不,他们不一样。Shadow DOM 是一种浏览器技术,主要用于在 web 组件中封装变量和 CSS。Virtual DOM 则是一种由 Javascript 类库基于浏览器 API 实现的概念。 ### 什么是“React Fiber”? {#what-is-react-fiber} From 0bfb81b76f50fea9cd54741ad55d4d1c703897d1 Mon Sep 17 00:00:00 2001 From: Alan Zhang Date: Sat, 23 Mar 2019 23:59:53 +0800 Subject: [PATCH 07/14] Update content/docs/faq-internals.md Co-Authored-By: ChiuMungZitAlexander --- content/docs/faq-internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index 1977c80fb0..80bdd97b6e 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -14,7 +14,7 @@ category: FAQ 由于“虚拟 DOM”相比于特定的技术更像是一种模式,我们提到它有时也代表不同的含义。在 React 世界里,术语“虚拟 DOM”通常与[React 元素](/docs/rendering-elements.html)关联在一起,因为它们都是呈现 UI 的对象。而 React 也使用一个名为“fibers”的内部对象来存放组件树的其他信息。上述二者也被认为是 React 中“虚拟 DOM ”实现的一部分。 -### 影子 DOM 和虚拟 DOM 是一回事吗? {#is-the-shadow-dom-the-same-as-the-virtual-dom} +### Shadow DOM 和 Virtual DOM 是一回事吗? {#is-the-shadow-dom-the-same-as-the-virtual-dom} 不,他们不一样。Shadow DOM 是一种浏览器技术,主要用于在 web 组件中封装变量和 CSS。Virtual DOM 则是一种由 Javascript 类库基于浏览器 API 实现的概念。 From 86eeb40c5dff1f14293202ae20cafbbca18d64b4 Mon Sep 17 00:00:00 2001 From: Alan Zhang Date: Sun, 24 Mar 2019 00:00:02 +0800 Subject: [PATCH 08/14] Update content/docs/faq-internals.md Co-Authored-By: ChiuMungZitAlexander --- content/docs/faq-internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index 80bdd97b6e..1c65d9a706 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -1,6 +1,6 @@ --- id: faq-internals -title: 虚拟 DOM 及内核 +title: Virtual DOM 及内核 permalink: docs/faq-internals.html layout: docs category: FAQ From 1e2c02412e305ebd4a9bc2839543102d249e8a28 Mon Sep 17 00:00:00 2001 From: Alan Zhang Date: Sun, 24 Mar 2019 00:00:38 +0800 Subject: [PATCH 09/14] Update content/docs/faq-internals.md Co-Authored-By: ChiuMungZitAlexander --- content/docs/faq-internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index 1c65d9a706..ce8e28d091 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -8,7 +8,7 @@ category: FAQ ### 什么是虚拟 DOM? {#what-is-the-virtual-dom} -虚拟 DOM 是一种编程概念。在这个概念里,一种想象的,或者说“虚拟的” UI 会被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/docs/reconciliation.html)。 +虚拟 DOM 是一种编程概念。在这个概念里, UI 以一种理想化的,或者说“虚拟的”表现形式被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/docs/reconciliation.html)。 这种方式采用了 React 的声明式 API:您告诉 React 希望让 UI 是什么状态,React 就确保 DOM 匹配该状态。这使您在构建应用程序时,省去了属性操作、事件处理和手动 DOM 更新。 From cd4046be1f06d552e5c3060beee57245d7290204 Mon Sep 17 00:00:00 2001 From: AlexanderZhao Date: Sun, 24 Mar 2019 00:15:56 +0800 Subject: [PATCH 10/14] Update faq-internals.md --- content/docs/faq-internals.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index ce8e28d091..c4dd413ead 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -6,13 +6,13 @@ layout: docs category: FAQ --- -### 什么是虚拟 DOM? {#what-is-the-virtual-dom} +### 什么是Virtual DOM? {#what-is-the-virtual-dom} -虚拟 DOM 是一种编程概念。在这个概念里, UI 以一种理想化的,或者说“虚拟的”表现形式被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/docs/reconciliation.html)。 +Virtual DOM 是一种编程概念。在这个概念里, UI 以一种理想化的,或者说“虚拟的”表现形式被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/docs/reconciliation.html)。 -这种方式采用了 React 的声明式 API:您告诉 React 希望让 UI 是什么状态,React 就确保 DOM 匹配该状态。这使您在构建应用程序时,省去了属性操作、事件处理和手动 DOM 更新。 +这种方式赋予了 React 声明式的 API:您告诉 React 希望让 UI 是什么状态,React 就确保 DOM 匹配该状态。这使您可以从属性操作、事件处理和手动 DOM 更新这些在构建应用程序时必要的操作中解放出来。 -由于“虚拟 DOM”相比于特定的技术更像是一种模式,我们提到它有时也代表不同的含义。在 React 世界里,术语“虚拟 DOM”通常与[React 元素](/docs/rendering-elements.html)关联在一起,因为它们都是呈现 UI 的对象。而 React 也使用一个名为“fibers”的内部对象来存放组件树的其他信息。上述二者也被认为是 React 中“虚拟 DOM ”实现的一部分。 +与其将“Virtual DOM”视为一种技术,不如说它是一种模式,人们提到它时经常是要表达不同的东西。在 React 的世界里,术语“Virtual DOM”通常与[React 元素](/docs/rendering-elements.html)关联在一起,因为它们都是代表了用户界面的对象。而 React 也使用一个名为“fibers”的内部对象来存放组件树的附加信息。上述二者也被认为是 React 中“Virtual DOM ”实现的一部分。 ### Shadow DOM 和 Virtual DOM 是一回事吗? {#is-the-shadow-dom-the-same-as-the-virtual-dom} @@ -20,4 +20,4 @@ category: FAQ ### 什么是“React Fiber”? {#what-is-react-fiber} -Fiber 是 React 16 中新的协调引擎。它的主要目的是使虚拟 DOM 可以进行增量式渲染。[了解更多](https://github.com/acdlite/react-fiber-architecture). +Fiber 是 React 16 中新的协调引擎。它的主要目的是使Virtual DOM 可以进行增量式渲染。[了解更多](https://github.com/acdlite/react-fiber-architecture). From 258e781835d6f84dd6de73b5a5518456a7f52783 Mon Sep 17 00:00:00 2001 From: QiChang Li Date: Tue, 26 Mar 2019 21:26:12 +0800 Subject: [PATCH 11/14] Update content/docs/faq-internals.md Co-Authored-By: ChiuMungZitAlexander --- content/docs/faq-internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index c4dd413ead..ec494a3fdc 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -12,7 +12,7 @@ Virtual DOM 是一种编程概念。在这个概念里, UI 以一种理想化 这种方式赋予了 React 声明式的 API:您告诉 React 希望让 UI 是什么状态,React 就确保 DOM 匹配该状态。这使您可以从属性操作、事件处理和手动 DOM 更新这些在构建应用程序时必要的操作中解放出来。 -与其将“Virtual DOM”视为一种技术,不如说它是一种模式,人们提到它时经常是要表达不同的东西。在 React 的世界里,术语“Virtual DOM”通常与[React 元素](/docs/rendering-elements.html)关联在一起,因为它们都是代表了用户界面的对象。而 React 也使用一个名为“fibers”的内部对象来存放组件树的附加信息。上述二者也被认为是 React 中“Virtual DOM ”实现的一部分。 +与其将 “Virtual DOM” 视为一种技术,不如说它是一种模式,人们提到它时经常是要表达不同的东西。在 React 的世界里,术语 “Virtual DOM” 通常与 [React 元素](/docs/rendering-elements.html)关联在一起,因为它们都是代表了用户界面的对象。而 React 也使用一个名为 “fibers” 的内部对象来存放组件树的附加信息。上述二者也被认为是 React 中 “Virtual DOM” 实现的一部分。 ### Shadow DOM 和 Virtual DOM 是一回事吗? {#is-the-shadow-dom-the-same-as-the-virtual-dom} From 3aebdecd6e2b67aec37d7cb574c071775e006306 Mon Sep 17 00:00:00 2001 From: QiChang Li Date: Tue, 26 Mar 2019 21:26:20 +0800 Subject: [PATCH 12/14] Update content/docs/faq-internals.md Co-Authored-By: ChiuMungZitAlexander --- content/docs/faq-internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index ec494a3fdc..19bf54367e 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -6,7 +6,7 @@ layout: docs category: FAQ --- -### 什么是Virtual DOM? {#what-is-the-virtual-dom} +### 什么是 Virtual DOM? {#what-is-the-virtual-dom} Virtual DOM 是一种编程概念。在这个概念里, UI 以一种理想化的,或者说“虚拟的”表现形式被保存于内存中,并通过如 ReactDOM 等类库使之与“真实的” DOM 同步。这一过程叫做[协调](/docs/reconciliation.html)。 From bc24abd22126e4f8cb47fe9f72d3b036d8cdcd56 Mon Sep 17 00:00:00 2001 From: QiChang Li Date: Tue, 26 Mar 2019 21:26:31 +0800 Subject: [PATCH 13/14] Update content/docs/faq-internals.md Co-Authored-By: ChiuMungZitAlexander --- content/docs/faq-internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index 19bf54367e..040e1eba45 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -18,6 +18,6 @@ Virtual DOM 是一种编程概念。在这个概念里, UI 以一种理想化 不,他们不一样。Shadow DOM 是一种浏览器技术,主要用于在 web 组件中封装变量和 CSS。Virtual DOM 则是一种由 Javascript 类库基于浏览器 API 实现的概念。 -### 什么是“React Fiber”? {#what-is-react-fiber} +### 什么是 “React Fiber”? {#what-is-react-fiber} Fiber 是 React 16 中新的协调引擎。它的主要目的是使Virtual DOM 可以进行增量式渲染。[了解更多](https://github.com/acdlite/react-fiber-architecture). From c761cd83a9ac186dd4023cc8e38035b13dceafc3 Mon Sep 17 00:00:00 2001 From: QiChang Li Date: Tue, 26 Mar 2019 21:26:36 +0800 Subject: [PATCH 14/14] Update content/docs/faq-internals.md Co-Authored-By: ChiuMungZitAlexander --- content/docs/faq-internals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/faq-internals.md b/content/docs/faq-internals.md index 040e1eba45..bb19d05b90 100644 --- a/content/docs/faq-internals.md +++ b/content/docs/faq-internals.md @@ -20,4 +20,4 @@ Virtual DOM 是一种编程概念。在这个概念里, UI 以一种理想化 ### 什么是 “React Fiber”? {#what-is-react-fiber} -Fiber 是 React 16 中新的协调引擎。它的主要目的是使Virtual DOM 可以进行增量式渲染。[了解更多](https://github.com/acdlite/react-fiber-architecture). +Fiber 是 React 16 中新的协调引擎。它的主要目的是使 Virtual DOM 可以进行增量式渲染。[了解更多](https://github.com/acdlite/react-fiber-architecture).