Skip to content

Instantly share code, notes, and snippets.

@meshboy
Created September 11, 2018 02:00
Show Gist options
  • Save meshboy/3178a19e02498bf8419e7feea247a137 to your computer and use it in GitHub Desktop.
Save meshboy/3178a19e02498bf8419e7feea247a137 to your computer and use it in GitHub Desktop.
<template>
<div>
<button class="btn btn-primary" @click="increase">Increase</button>
<button class="btn btn-danger" @click="decrease">Decrease</button>
</div>
</template>
<script>
export default {
name: "app-counter",
methods: {
increase() {
this.$store.state.counter++;
},
decrease() {
this.$store.state.counter--;
}
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment