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

    Using Store in Components

    Help
    2
    3
    372
    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.
    • M
      mecjos last edited by

      How Can I use vuex store in vue components… I don’t want to write this.$store.state… Can use just like store.state…

      1 Reply Last reply Reply Quote 0
      • S
        sebag last edited by sebag

        just use the mapState helper:
        https://vuex.vuejs.org/guide/state.html#the-mapstate-helper

        M 1 Reply Last reply Reply Quote 0
        • M
          mecjos @sebag last edited by mecjos

          @sebag thanks for your answer… it’s not only about this.$store.state… I just gave an example. It’s written in app.js file as follows in .quasar folder:

          // Create the app instantiation Object.
          // Here we inject the router, store to all child components,
          // making them available everywhere as this.$router and this.$store.
          const app = {
          router,
          store,
          render: h => h(App)
          }

          that means as far as I understand I can use in compenets only just ‘store.someThing’…

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