I am following Component Basics guide on vuejs.org, but I cannot produce the result as guided. I don't know whether to put the methods property on component or on root Vue instance.
When I put method onIncreaseCount inside component, an error is thrown.

But when I put method onIncreaseCount inside root Vue instance, although there is no error, nothing is applied when I click the button.
// JS Vue.component('button-counter', { data: function(){ return {count: 0} } template: `<button v-on:click="$emit('increase-count')">You clicked me {{ count }} times.</button>`, methods: { onIncreaseCount: function(){ this.count++ } } }) new Vue({ el: "#main" }) // HTML <main class="main" id="main"> <button-counter title="Example component" @increase-count="onIncreaseCount"></button-counter> </main> I expect the {{ count }} value will be increased each time I click the button, but it doesn't change.