Skip to content

Commit

Permalink
Merge pull request #161 from ivaneroshkin/virtual-dom
Browse files Browse the repository at this point in the history
Translate "Virtual DOM"
  • Loading branch information
another-guy committed Feb 26, 2019
2 parents 0492de3 + aa08fdb commit 8d88821
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions content/docs/faq-internals.md
@@ -1,23 +1,23 @@
---
id: faq-internals
title: Virtual DOM and Internals
title: Виртуальный DOM и детали его реализации в React
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 (VDOM) — это концепция программирования, в которой идеальное или «виртуальное» представление пользовательского интерфейса хранится в памяти и синхронизируется с «настоящим» DOM при помощи библиотеки, такой как ReactDOM. Этот процесс называется [согласованием](/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.
Такой подход и делает API React декларативным: вы указываете, в каком состоянии должен находиться пользовательский интерфейс, а 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), поскольку они являются объектами, представляющими пользовательский интерфейс. Тем не менее, React также использует внутренние объекты, называемые «волокнами» (fibers), чтобы хранить дополнительную информацию о дереве компонентов. Их также можно считать частью реализации «виртуального DOM» в React.

### 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 (Shadow DOM) — это браузерная технология, предназначенная в основном для определения переменных и 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).
Empty file modified gatsby-config.js 100644 → 100755
Empty file.
Empty file modified src/components/CodeEditor/CodeEditor.js 100644 → 100755
Empty file.
Empty file modified src/components/ErrorDecoder/ErrorDecoder.js 100644 → 100755
Empty file.
Empty file modified src/components/LayoutFooter/Footer.js 100644 → 100755
Empty file.
Empty file modified src/components/TitleAndMetaTags/TitleAndMetaTags.js 100644 → 100755
Empty file.
Empty file modified src/pages/index.js 100644 → 100755
Empty file.

0 comments on commit 8d88821

Please sign in to comment.