Skip to content

How to create multiple same stores without duplicating its code? #771

Discussion options

You must be logged in to vote

create one object and copy it, just like regular js:

const options = {}
defineStore('one', {...options})
defineStore('two', {...options})

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@igolka97
Comment options

@posva
Comment options

posva Nov 4, 2021
Maintainer

@igolka97
Comment options

Answer selected by igolka97
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@kevinramharak
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants