Skip to content
#

react-like

Here are 21 public repositories matching this topic...

Foveluy
Foveluy commented May 10, 2018

Luy (React 16 以前) 架构

本文主要讲解、理清、复习 Luy 之前的架构,以方便在重构后和重构前的对比,内容较多,算是对自己的一个复习。

两个createElement :一切的开始

document.createElement

在几年前,React 其实用的并不是 document.createElement 这个 API 去创建DOM节点,而是使用的 innerHTML 来创造 DOM 节点。换做这个的原因是因为 document.createElement 的速度远大于 innerHTML 这个东西。这一步的修改,给 React 带来了更大的性能提升。

官方博客中,我们可以看到了官方给出的答案。

Improve this page

Add a description, image, and links to the react-like topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the react-like topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.