title: Vue: event-bus handler is undefined
body: <p>I want to implement event-bus iin my vue app.</p>
  
  <p>First I want to make event-bus calls to start loading.
  My main component's script tag where I call the <code>$on</code> is look like this:</p>
  
  <pre><code>&lt;script&gt;
      import store from '../store.js'
      import EventBus from '../event-bus';
  
      import Header from './includes/Header'
      import Footer from './includes/Footer'
      import Loading from './includes/Loading'
  
      export default {
          data() {
              return {
                  isLoading: null
              }
          },
          components: {
              Header,
              Footer,
              Loading
          },
          mounted() {
              EventBus.$on('isLoading'), function (payLoad) {
                  console.log(payload)
                  this.isLoading = payload
              };
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>But I got this error:</p>
  
  <blockquote>
    <p>[Vue warn]: Error in event handler for "isLoading": "TypeError: handler is >undefined"</p>
  </blockquote>
  
  <p>How can I fix it?</p>