Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react 与 vue 的技术栈对比,说下区别 #148

Open
sisterAn opened this issue Feb 21, 2021 · 1 comment
Open

react 与 vue 的技术栈对比,说下区别 #148

sisterAn opened this issue Feb 21, 2021 · 1 comment
Labels

Comments

@sisterAn
Copy link
Owner

No description provided.

@violetrosez
Copy link

violetrosez commented Feb 22, 2021

  • react整体是函数式的思想,把组件设计成纯组件,状态和逻辑通过参数传入,而vue的思想是响应式的,也就是基于是数据可变的,通过对每一个属性建立Watcher来监听, 当属性变化的时候,响应式的更新对应的虚拟dom,他们的dom更新算法也不太一样
  • react的思路通过js来生成html, 所以设计了jsx,还有通过js来操作css。vue是自己写了一套模板编译的逻辑,可以把js css html糅合到一个模板里边
  • react是类式的写法,api很少 而vue是声明式的写法
  • react可以通过高阶组件来扩展,而vue需要通过mixins来扩展

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants