how to delay store creation (async)

  • using quasar 1+

    I have to connect to and get some initial info from my backend database (async) before I have everything I need to set up my vuex store.

    Quasar imports/loads index.js in /store (if it exits) sync way early. I need to await on my database.

    I suppose I could rename the folder but is it possible to tell quasar not import that file (sync).

    Then I can call my store create function later in App.vue or my default layout vue file

    Anyway what would be the recommended way to do this?

    Further if I create the store via my own call how do I make sure it gets referenced by $store? as it seems the 3rd party “plugin” in quasar.conf.js is gone.

  • Per my last question above …super bad idea I suppose but since I can’t figure out how to register a vue plugin in 1.0 I added it as a key to $root.

  • Phew… looks like plugin was superseded by boot and can even be async so my question is answered

Log in to reply