Skip to main content

Vue

Vue is a progressive JavaScript framework for building user interfaces. It's designed to be incrementally adoptable - start small and scale up as needed. Vue combines the best aspects of React and Angular with an approachable learning curve.

Core Concepts

  • Single-File Components (SFC): Template, script, and styles in one file
  • Reactivity: Automatic tracking of dependencies
  • Composition API: Flexible logic composition (Vue 3)
  • Options API: Traditional, beginner-friendly structure
  • Directives: v-if, v-for, v-bind, v-model

Single-File Component Example

<template>
<button @click="count++">
Count: {{ count }}
</button>
</template>

<script setup>
import { ref } from 'vue';

const count = ref(0);
</script>

<style scoped>
button {
padding: 1rem 2rem;
}
</style>

Ecosystem

NeedOfficial/Recommended
RoutingVue Router
StatePinia (official)
Build toolVite
SSR/SSGNuxt
TestingVitest, Vue Test Utils
DevToolsVue DevTools

Vue vs React

AspectVueReact
TemplatesHTML-basedJSX
ReactivityAutomaticManual (useState, etc.)
Learning curveGentlerModerate
Official ecosystemMore batteries includedBring your own
Community sizeSmaller but growingLargest

What We Like

  • Developer experience: Excellent tooling and error messages
  • Documentation: Some of the best in the industry
  • Gentle learning curve: Easy for beginners, powerful for experts
  • SFC format: Clean separation within single files
  • Reactivity: Just works without boilerplate

What We Don't Like

  • Smaller job market: Fewer positions than React
  • Enterprise adoption: Less common in large corporations
  • Migration effort: Vue 2 to Vue 3 transition was significant
  • TypeScript: Good but not as seamless as Angular

When to Choose Vue

  • Rapid prototyping and MVPs
  • Teams new to frontend frameworks
  • Projects prioritizing developer happiness
  • Laravel or PHP shop frontend modernisation

For full-stack Vue applications, we strongly recommend Nuxt.