react源码剖析
A declarative, efficient, and flexible JavaScript library for building user interfaces.
declarative:声明式。React将此作为第一个词,可见其重要性。declarative对应imperative(敕令式),移步这里看看什么是 declarative Javascript.
关于react,declarative的寄义是:declarative UI.
Declarative views make your code more predictable, simpler to understand, and easier to debug.
这说的是JSX语法,能够在JS内里直接写html和css,是一次斗胆勇敢的立异。JSX让人写前端代码写得直呼过瘾。
React is flexible and can be used in a variety of projects. You can create new apps with it, but you can also gradually introduce it into an existing codebase without doing a rewrite.
你没有必要非在全部网页或许全部项目中运用react。你能够只在一个dom节点中运用,然后慢慢地去做重构。所以,运用react和运用jquery,angular并不争执。