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

    how to delay store creation (async)

    Help
    1
    3
    280
    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.
    • D
      dgk last edited by dgk

      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.

      1 Reply Last reply Reply Quote 0
      • D
        dgk last edited by dgk

        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.

        1 Reply Last reply Reply Quote 0
        • D
          dgk last edited by

          Phew… looks like plugin was superseded by boot and can even be async so my question is answered
          https://quasar.dev/quasar-cli/cli-documentation/boot-files#Examples-of-appropriate-usage-of-boot-files

          1 Reply Last reply Reply Quote 0
          • First post
            Last post