React DOM compares the element and its children to the previous one,
React DOM將元素及其子元素與前一個元素進行比較歹颓,
and only applies the DOM updates necessary to bring the DOM to the desired state.
并且僅對狀態(tài)為需要更新的DOM進行DOM更新。
You can verify by inspecting the last example with the browser tools:
你可以通過瀏覽器工具對最后一個事例進行驗證檢驗:
Even though we create an element describing the whole UI tree on every tick, only the text node whose contents has changed gets updated by React DOM.
即使我們不斷的創(chuàng)建一個元素描述整個UI续崖,但是也只有文本節(jié)點的內(nèi)容的改動被React DOM更新了。