No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Not Apparent in .15... Where to dispatch store actions on app load?

    Help
    1
    2
    594
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      thindery last edited by thindery

      In my old .14 quasar app I would add this to my main.js:

      created: function() {
          	this.$store.dispatch('loadOrders')
      }
      

      But I don’t see how/where to dispatch that action anymore because I can’t find anywhere that Vue is instantiated like the main.js did. What am I missing?

      1 Reply Last reply Reply Quote 0
      • T
        thindery last edited by

        Got this figured out…

        In the App.vue just add like this:

        export default {
          name: 'App',
          created: function() {
            	this.$store.dispatch('loadOrders')
        	}
        }
        
        1 Reply Last reply Reply Quote 1
        • First post
          Last post