I am looking to streamline my code by creating a "Class" that can easily generate multiple identical Pinia stores with specific data for each. How can I achieve this efficiently?
import { ref } from 'vue'
import { defineStore } from 'pinia'
class StoreGenerator {
constructor(store_name) {
export const TeamStore = defineStore(store_name, () => {
const objects = ref([])
function add_object(info) {
objects.value.push(info)
}
return { objects, add_object }
})
}
}