Static GitHub Issues

[1260] [Need help] How to commit 'action' on mounted() or created() ?

prev: How to add component to same chunk?
next: nuxtServerInit is never called

I try many way but seem like im stupid ; w ;

<script>
  import { mapActions, mapGetters } from 'vuex'

  export default {
    computed: {
      ...mapGetters({
        isMenuOpen: 'menu/isMenuOpen',
        screenSize: 'menu/screenSize'
      })
    },
    methods: {
      ...mapActions({
        toggleMenu: 'menu/toggleMenu',
        checkIsDesktop: 'menu/checkIsDesktop'
      })
    },
    mounted () {
      'checkIsDesktop'
    }
  }
</script>
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1115">#c1115</a>)</em></sub></div>