In the next few pages, you will be provided with some examples. In order to execute these examples, you need to create an HTML file as follows:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vuex condensed example</title>
</head>
<body>
<div id="app"></div>
<script src="https://unpkg.com/[email protected]/dist/vuex.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/vue.min.js"></script>
<script>
Vue.use(Vuex);
// Add code from examples here
</script>
</body>
</html>
By copying the example code inside the <script> tag, you can run it and see the results. Almost every example code can be found in the Git repository of this book, under the /chapter-2/ folder.
...