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

    Error when using Vuex 4 getters in Quasar V2

    Framework
    1
    2
    477
    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.
    • A
      Ammamon last edited by

      Error when using Vuex 4 getters in Quasar V2
      In setup of composition api, I added the following.

      setup(props) {
         const store = useStore()
         const randomNumber = computed(()   =>  store.getters['item/getRandomNumber'])
      return { randomNumber };
      },
      

      But getting lint error:

      @typescript-eslint/no-unsafe-member-access: Unsafe member access ['item/getRandomNumber'] on an any value.
      
      1 Reply Last reply Reply Quote 2
      • A
        Ammamon last edited by

        However, without typescript, it is working.

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