oeyoews / neotw-tiddlers

由Tiddlywiki 记录的一些闪念笔记,主题笔记,词条笔记,项目笔记. 核心就是日记
https://tiddlywiki-starter-kit.vercel.app
Other
0 stars 1 forks source link

vue和react的一些概念对比 #53

Closed oeyoews closed 7 months ago

oeyoews commented 7 months ago
oeyoews commented 6 months ago

果然 vue 和react都要学,一个也跑不掉,第n次开始重新看vue教程,开始当时学react的感觉了

update: 刚开始还是不习惯(可能是react写习惯了), vue3 的新语法也不少啊, 第一次看只能看个大概, 项目需要再细看, 效率更高

oeyoews commented 6 months ago
oeyoews commented 6 months ago

nuxt 越写越像react

oeyoews commented 6 months ago

nuxt 的东西也不少

oeyoews commented 6 months ago

vue/react 的文档有点类似, 但是又不完全相同, 感觉也都不错

oeyoews commented 6 months ago

react的样式写法比较固定,vue的样式绑定花样真多,看完这个章节,完全没记住,以后二刷吧

oeyoews commented 6 months ago

vue的响应式,原来就是订阅者模式,之前看到一直不知道应用场景

oeyoews commented 6 months ago

ref是针对基本类型 reactive是对象的深层数据绑定

bind是单向绑定 model是表单类元素双向绑定

oeyoews commented 6 months ago

vue将hydrate翻译成激活,有点类似react翻译的浇水,都比水化好理解多了

oeyoews commented 6 months ago

组合式api又被称为语法糖

oeyoews commented 6 months ago

用久了文件路由, vue-router 感觉自己配置起来好难用, nuxt 的文件路由似乎也是根据它配置的

oeyoews commented 6 months ago

尝试手动配置vuerouter,一直不生效,原来是没加routerview

oeyoews commented 6 months ago

unplugin 没看明白使用场景

oeyoews commented 6 months ago

用久了文件路由, vue-router 感觉自己配置起来好难用, nuxt 的文件路由似乎也是根据它配置的

使用unplugin-vue-router 解决了

oeyoews commented 6 months ago

vue 加上各种插件好像就是nuxt

oeyoews commented 6 months ago

vike 似乎直接接管了router

oeyoews commented 6 months ago

ssr 在vite 里面集成还是麻烦, 还带是nuxt

oeyoews commented 6 months ago

vue 的jsx 还是写起来有点区别的

oeyoews commented 6 months ago

vue 的jsx 还是写起来有点区别的

完全没有当初写react的jsx的那种感觉了,在vue里面用jsx,暂时放弃vue的jsx

oeyoews commented 6 months ago

一些vue 库包括vue的文档, 两种api 写法各种掺杂, 如果新手没有了解, 很容易迷

oeyoews commented 6 months ago

y

一些vue 库包括vue的文档, 两种api 写法各种掺杂, 如果新手没有了解, 很容易迷

有的就仅仅写了一种写法, 很像neovim 的插件一样仅仅写了vim-plugin的写法, 却没有写packer的写法