HylaruCoder🇨🇳 Profile picture
Jul 3 12 tweets 3 min read Twitter logo Read on Twitter
Vue vs React 是个月经贴, 本人不是专业的前端, 两个都仅仅是熟练使用.
先说结论: #Nuxt3 和 #Vue3 目前给我的开发体验是最好的.
个人排名: nuxt 3 (vue 3) > next 13 (react FC) > vue 2 > react class component

以下是我作为熟练工的一些直观感受.
1. React 简洁而强大, Vue 简单而能干.
- react = js + jsx + 少量API
- vue = html + css + js + 大量语法糖.

语法糖早几年我就不喜欢. 但随着我的重点放在了把项目完成,而不是折腾新技术的时候。我逐渐体会到了 「框架给我的,我可以不用,但是框架完全不给好麻烦」
2. React/NextJS 现在也需要读不少的文档。

React 官方开始推荐 nextjs 作为脚手架, 而 next 13 已经在往 PHP 的方向前进, 而当我尝试将老代码从 next12 代码迁移到新的 Server Component + Server Action 的时候, 懵了。翻了半天文档完全不知道要干啥,最后 use client 一把梭。
3. 最佳实践, vue 社区最好用的 vitesse 系列, SPA/Nuxt SSR/插件 使用起来体验相当一致, 见


反观,React 社区,脚手架就多而体验很不一致。github.com/antfu/vitesse
4. 对于我这样的 Full Stack,后端技术栈 Python,切语言写东西是家常便饭。虽然已经写了两年 react,但每次写必须打起精神,先组织 html css js,然后硬着头皮按照 react way 来写。相比较而言,写 Vue 的时,整个人就很放松,没有那么费心。
5. 哪怕我四年前写过vue2, 现在用 typescript + tailwind 来写 nuxt 3 + vue3 不仅是光速上手,而且产出效率依然是我用 react + next 的2倍多(单纯是写代码阶段,构思阶段耗时相差不大)。nuxt + vue 真的非常符合直觉。
6. Nuxt 有多注重开发者体验呢?那必须要聊聊 nuxt devtools。
6.1 nuxt devtools 选中可以快速跳转到正在编辑的模板。视频中我使用的是 webstorm。
6.2 nuxt devtools 当你点击下方的图标时,将会展开一个 DevTools Panel,如此便可享有总览全局的功能。它覆盖了你所关心的方方面面,从总览到细节,从控件到资源,从 composition api 到网络请求,无所不包。
6.3 nuxt devtools 甚至,你还能直接选 icon
你也可以让 nuxt devtools 弹出窗口和浏览器并列或者移动到辅屏。这里留个思考题:如何通过网页弹出一个和浏览器并列的窗口呢?
FBI Warning:🔥Nuxt DevTools 和 vitesse 出自同一个之手。
github.com/antfu/vitesse
7) 如果要让我使用 React/Next 重写一个版本,在这么短的时间内能赶出来是有点压力的。

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with HylaruCoder🇨🇳

HylaruCoder🇨🇳 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(