November 2017
Beginner to intermediate
398 pages
8h 42m
English
The <script> tag contains the JavaScript code associated with the component. It should export the component definition object.
Here's an example of a <script> tag:
<script>export default { data () { return { movies: [ { title: 'Star Wars' }, { title: 'Blade Runner' }, ], } },}</script>
In this example, the component will have a data hook returning an initial state with a movies array.
Read now
Unlock full access