LEARNING BY VUEING

Defining state
3 / 42

Inside <script> the object we export exposes a handful of properties with which we achieve reactivity.

One of these properties is data, a function in which we define the state.

It returns the state title. In the template, we can then access the variable using mustache syntax {{ title }}.


Inside {{ }} you can write JavaScript! Try changing it to {{ title.toUpperCase() }}.