→Virtual DOM: I extend and clarified information about virtual DOM in React, add citation about its' speed, also I add external link to the mentions of ReactDOM library
React code is made of entities called components. Components can be rendered to a particular element in the [[Document Object Model|DOM]] using the [https://reactjs.org/docs/react-dom.htmlReact ReactDOM]DOM library. When rendering a component, one can pass in values that are known as "props":<ref>{{cite web|url=https://reactjs.org/docs/components-and-props.html#props-are-read-only|website=React|title=Components and Props|publisher=Facebook|access-date=7 April 2018}}</ref>
<syntaxhighlight lang="js">
Line 74:
===Virtual DOM===
Another keynotable feature is the use of a virtual [[Document Object Model]], or [[virtual DOM]]. React creates an [[In-memory processing|in-memory]] data-structure cache, computes the resulting differences between current and previous version of it, and tagsthen onlyupdates changedthe parts.browser's Thisdisplayed processDOM is called '''reconciliationefficiently.'''<ref Aftername=workingwiththebrowser>{{cite reconciliationweb happens [|url=https://reactjs.org/docs/reactrefs-and-the-dom.html ReactDOM]|title=Refs updatesand the real DOM. |website=React Blog}}</ref> This predefinedprocess flowis called '''reconciliation'''. This allows the programmer to write code as if the entire apppage is rerenderedrendered on each change, while inthe factReact ReactDOMlibraries only rerendersrender DOM nodes,subcomponents that actually have changed since previous renderchange. This selective rerenderingrendering provides a major performance boost.{{citation overneeded|date=January rerendering2021}} It saves the entireeffort appof onrecalculating eachthe change.<ref>{{CiteCSS web|last=Decstyle, 27layout 2018|first=Richfor Harristhe Thu|title=Virtualpage DOMand isrendering purefor overhead|url=https://sveltethe entire page.dev/blog/virtual-dom-is-pure-overhead{{citation needed|access-date=January 2021-04-06|website=svelte.dev|language=en}}</ref>