Skip to content

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

Closed Answered by posva
igolka97 asked this question in Help and Questions
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 5 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
2 replies
@kevinramharak
Comment options

@Jalliuz
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