Comparing React and Vue
By Steve LeePublished
As part of Neontribe's ongoing technology evaluation for projects, Nick and myself recently performed a comparative review of React and Vue, looking at both technical and community aspects. This post provides a very brief overview of what we discovered.
It's very clear that both projects are broadly similar and are closely monitoring each other, so that features that appear in one often also appear in the other. For example, SPA build support is available in Vue's Nuxt and will soon be appearing for React too. Given that, YMMV depending on when you read this post.
Current differences
React | Vue | |
---|---|---|
tl;dr - code based with many choices, unlikely to hit technical, HR or market limits | tl;dr; declarative, more opinionated/structured, easier onramp and potential faster dev | |
Massive, mature ecosystem provides many learning resources, strong support and wide component choices | Smaller ecosystem, newer but growing fast and looks sustainable. Relatively opinionated means less choice | |
Everything is just Javascript | Declarative HTML based - Single File Components | |
View is Render functions or JSX | Optional view templates with DSL - somewhat simpler for common cases | |
Enforced unary state flow within a component | Reactive state updates and optional 2-way binding | |
Many non-core CSS options | Scoped CSS directly supported | |
Possibly better for v big apps | Low barrier to entry, eg using Nuxt framework for SPAs | |
Working native app support | Faster (sometimes - largely due to snabbdom) |
Similarities
- Components
- Render functions or JSX for view
- State and event handling, HTTP library agnostic
- ES6+ or TypeScript
- SSR
- Dev tooling - eg webpack with HMR
- Deployment sizes
- Support for PWA
- Low churn in core elements
- MIT License
Useful resources
- Obviously biased, but well considered with input from React community - vue docs comparison
- A good high level comparison - Angular vs. React vs. Vue: A 2017 comparison
- Comparison of all the components typically used in a SPA - Can Vue Fight for the Throne with React?
- Realworld App - React/Redux and Vue/Vuex (incomplete)