FRAMEWORK » VUE

Declarative rendering

Single-File Component (SFC)

Variables are defined in data().

vue
<script>
export default {
  data() {
    return {
      message: 'Hello World!'
    }
  }
}
</script>

Variables are used in template within {{ }}.

vue
<template>
  <h1>{{ message }}</h1>
</template>