## glossary

What is Vue.js?

Vue.js is a JavaScript framework for building interfaces, created in 2014 by Evan You — a former Google engineer who had worked with AngularJS and wanted to extract its best ideas into a lighter package. It is maintained by the community, with no big company behind it.

Vue defines itself as progressive: you can use it just to add interactivity to an existing page, by including a script, or build a full application on top of it with routing and global state. That gradual path is what makes it approachable for people coming from HTML.

Single File Components

Vue’s trademark is the Single File Component: a component’s template, logic and styles live together in a .vue file, with the CSS optionally scoped automatically.

A complete Vue component
<script setup>
import { ref, computed } from 'vue';

const itens = ref([]);
const total = computed(() => itens.value.length);
</script>

<template>
  <h2>Tarefas ({{ total }})</h2>
  <ul>
    <li v-for="item in itens" :key="item.id">{{ item.texto }}</li>
  </ul>
</template>

<style scoped>
h2 { color: #14b8a6; }
</style>

Reactivity: the core difference from React

While React re-runs the entire component when state changes and diffs the result, Vue tracks which data each part of the template uses and updates only what is necessary. In practice, that means less worry about manual memoization: there is no mandatory day-to-day equivalent of useMemo or useCallback.

The template directives

  • v-if / v-else — renders conditionally, removing the element from the DOM.
  • v-for — iterates over lists, requiring a stable :key.
  • v-model — binds a form field to state in both directions, in one line.
  • v-bind — binds dynamic attributes to state.
  • v-on — listens to DOM events.

When to choose Vue

Vue tends to win when the team comes from HTML/CSS and needs quick productivity, or when having an official router and state manager matters more than choosing among dozens of options. React tends to win on the size of the job market and the ecosystem. Technically, both solve the same problems with equivalent quality. The comparative overview is in Types of frameworks.

## faq

Frequently asked questions

Is Vue easier than React?

For those coming from HTML and CSS, usually yes: the template looks like HTML and v-model handles forms with very little code. For those who already think in functional JavaScript, React may feel more natural, being essentially functions and expressions.

What is the difference between the Options API and the Composition API?

The Options API organizes the component into fixed blocks (data, methods, computed) and is more readable for beginners. The Composition API groups code by feature inside a setup, which scales better in large components and makes logic easier to reuse. Both are supported in Vue 3.

Does Vue have a job market in Brazil?

It does, but in clearly smaller volume than React. Vue shows up often in agencies, internal projects and products that prioritize delivery speed. Those chasing the largest number of openings usually prioritize React.