Vue

The approachable pick when job-market size isn't your top priority.

Vue gives you most of what React offers - components, reactivity, a mature ecosystem - with templates that look like the HTML you already know and documentation written with newcomers in mind. Stack Picker recommends it when the gentler learning curve is worth more to you than React's larger job market.


Who gets this pick

Vue is the frontend result when none of React's triggers apply - you're not mainly job-hunting, not building a highly interactive web app, and not in a larger team - and you're not a total beginner building a simple site. In practice that means:

  • a shop or e-commerce site, at any experience level, or
  • a portfolio, blog or content site when you're already comfortable with JavaScript and want more structure than plain JS.

Why Vue fits

Vue's single-file components keep a component's template, logic and styles together in one .vue file, and the template is just HTML with a few extra attributes (v-if, v-for, @click). If you can read HTML, you can read a Vue component on day one.

Vue also makes more decisions for you than React does. Routing (Vue Router) and state management (Pinia) are official, documented libraries, so you don't have to research and compare five options before building anything. And because Vue can be dropped into an existing page with a single script tag, you can add it to a server-rendered site one widget at a time.


Getting set up

npm create vue@latest

The official scaffolder asks whether you want TypeScript, Vue Router and Pinia - say no to everything for your first project, and add them when you need them. Use the Composition API with <script setup>; it's what the current docs teach, and mixing it up with older Options API tutorials is a classic source of confusion.


A first project: a product catalogue with a cart

This one fits both shop builders and anyone who wants a meaty practice project:

  1. Load products from a local products.json and render them with v-for.
  2. Add category filter buttons, with the filtered list as a computed value.
  3. Build a cart: an array in a ref, "add to cart" buttons, quantity controls and a computed total.
  4. Persist the cart to localStorage with watch, so a refresh doesn't empty it.
  5. Split the page into components - ProductCard, CartPanel - and pass data with props and events.
For a real shop, don't build payments yourself. Use a hosted checkout such as Stripe Checkout or a platform like Shopify for orders and payments, and use Vue for the custom storefront around it.

Hosting and cost

A built Vue app is static files: free on Netlify, Cloudflare Pages or GitHub Pages, or upload the dist folder to shared hosting. For content-heavy sites that need good SEO, look at Nuxt (Vue's full framework, with server rendering and static generation) or VitePress for documentation-style sites.


Mistakes to avoid

  • Forgetting .value on refs inside <script setup> - and adding it inside templates, where Vue unwraps refs for you.
  • Mutating props. A child component should emit an event and let the parent change the data.
  • Using v-if and v-for on the same element. Filter with a computed property instead.
  • Mixing API styles from tutorials of different eras. Stick to the Composition API.
  • One giant component. If a file passes ~200 lines, it's probably two or three components.

If your goals change

If you later decide to go job-hunting, the switch to React is smaller than it looks: components, props, events, computed values and reactivity all have direct React equivalents. Vue experience is a genuine head start, not a detour.


Take the quiz All picks