vueblocks / vue-use-utilities

A collection of vue composition-api utilities.
https://vueblocks.github.io/vue-use-utilities/
MIT License
33 stars 7 forks source link

How to use ...useState within <script setup> ? #24

Open Fenrir200678 opened 2 years ago

Fenrir200678 commented 2 years ago

Hi, I'm currently playing around with the vuex composition helpers. It works fine if you use it in the setup method like in the docs:

import { useVuex } from '@vueblocks/vue-use-vuex'

export default {
  setup () {
    const { useState } = useVuex()

    return {
      ...useState({
        count: state => state.count,
      })
    }
  }
}

But how can we get it to work within Githubissues.

  • Githubissues is a development platform for aggregating issues.