Vue.js
View
A progressive JavaScript framework. Two-way binding. Low learning curve.
View
A progressive JavaScript framework. Two-way binding. Low learning curve.
Vue.js is a progressive JavaScript framework created by Evan You in 2014. 'Progressive' means you can scale up its features as needed, from simple interactions to complex SPAs. With HTML template syntax, two-way binding, and an intuitive API, it has a low learning curve.
Vue 3 introduced the Composition API. Unlike the Options API (data, methods, computed), it organizes logic by feature using ref, reactive, computed, watch, and so on inside the setup() function. Code reusability and TypeScript support improved significantly.
Vue's reactivity system is Proxy-based. When data changes, the related DOM is updated automatically. ref() makes primitive values reactive, and reactive() makes objects reactive. computed() handles dependency-based caching, and watch() handles side effects.
The Vue ecosystem consists of Pinia (state management), Vue Router (routing), and Nuxt (SSR/SSG framework). With SFCs (Single File Components), you write the template, script, and style in a single .vue file, and it integrates seamlessly with Vite.
<!-- Vue 3 Composition API 예제 (SFC) -->
<script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'
// 반응형 상태
const count = ref(0)
const name = ref('Vue')
// 계산된 속성
const doubleCount = computed(() => count.value * 2)
// 메서드
const increment = () => count.value++
// 감시자
watch(count, (newVal, oldVal) => {
console.log(`count: ${oldVal} → ${newVal}`)
})
// 라이프사이클
onMounted(() => {
console.log('컴포넌트 마운트됨')
})
</script>
<template>
<div class="counter">
<h1>Hello, {{ name }}!</h1>
<p>Count: {{ count }} (Double: {{ doubleCount }})</p>
<button @click="increment">+1</button>
<input v-model="name" placeholder="이름 입력" />
</div>
</template>
<style scoped>
.counter { padding: 20px; }
button { margin: 10px 0; }
</style>
"Vue has a gentle learning curve, so team onboarding is fast. HTML templates are familiar, and the official documentation is well localized. It has less boilerplate than React and is lighter than Angular."
"Vue 3's Composition API was introduced for logic reuse. In the Options API, code for the same feature was scattered across data, methods, and computed; the Composition API lets you group it by feature and extract it into composable functions."
"A value declared with ref has to be accessed with .value in the script, but in the template it's unwrapped automatically, so you can use it without .value. Also, destructuring a reactive() object breaks reactivity, so use toRefs()."
Take a mock interview on this topic → WIA SOOM AI Interview · Start for free
With const { name } = reactive({ name: 'Vue' }), name is no longer reactive. Wrap it with toRefs() or use ref().
v-if has higher priority than v-for, so it won't work as intended. Separate them with a template tag or filter with computed.
We recommend the combination of script setup + TypeScript + Composition API. Use Pinia for state management, Vue Router for routing, and Nuxt if you need SSR.