React vs Vue
JSX and manual memoization against HTML templates and automatic reactivity tracking — two different bets on where the framework should do the work.
3 min read
React and Vue solve the same problem — declarative, component-based UIs — with genuinely different philosophies about how much the framework should infer for you versus how much you should express explicitly in code.
Templates vs. JSX
Vue renders from HTML-like templates; React renders from JSX, which is JavaScript with markup mixed directly in:
// React
function Counter({ count, onIncrement }) {
return <button onClick={onIncrement}>{count}</button>;
}<!-- Vue -->
<template>
<button @click="$emit('increment')">{{ count }}</button>
</template>Because JSX is plain JavaScript, anything JavaScript can do — loops, conditionals, function calls — is available without any special template syntax to learn. Vue's templates trade that flexibility for something in return: since they're a constrained subset of HTML, Vue can statically analyze them at build time and skip re-checking parts of the DOM that can't have changed, which JSX's arbitrary expressiveness makes harder to do automatically.
Reactivity: explicit vs. tracked
This is the deepest difference between them. React re-runs a component's entire function on a state change and figures out the resulting DOM diff; Vue tracks reactive dependencies at a granular level and updates only the exact DOM nodes that depend on a changed value.
// React — re-running the function is the mechanism
const [count, setCount] = useState(0);
setCount(count + 1);// Vue — the runtime tracks exactly what depends on this ref
const count = ref(0);
count.value++;In practice, this means React more often asks you to think about when something re-renders and to opt into skipping unnecessary work yourself (useMemo, useCallback, React.memo), while Vue's reactivity system handles a lot of that fine-grained update targeting automatically, with less manual tuning.
Hooks vs. Composition API
Both frameworks moved from an older, more rigid API (React's class components, Vue's Options API) toward composing logic from small functions — React's Hooks and Vue's Composition API solve a similar problem. The mechanics differ in a way that matters day to day: Vue's ref/reactive values can be read and written freely from anywhere, while React's Hook rules (only call at the top level, only from components) exist specifically because React re-runs the whole function on every render and needs hook calls to happen in a stable order to track state correctly. Vue has no equivalent constraint, because its state isn't tied to a function re-executing.
Ecosystem and adoption
React has the larger ecosystem, the most job postings, and Meta, Vercel (via Next.js), and a large share of the industry building on it — if you're optimizing for hireability or library availability for something unusual, React is the safer bet. Vue has a smaller but well-maintained ecosystem (Nuxt, Pinia) and a reputation for a gentler learning curve, particularly for developers coming from plain HTML/CSS/JS rather than a heavy JavaScript background.
Which should you learn first
Learn React first if you're optimizing for job opportunities or plan to use Next.js, since Next.js is built on React. Learn Vue first if template-based syntax closer to HTML feels more natural to you, or if the team or project you're joining has already chosen it — the underlying concepts (components, reactive state, one-way data flow with escape hatches for communicating upward) transfer in both directions once you've learned either one well.
See What is Vue? for how Vue's template syntax and reactivity system work in more depth.