Skip to content
Discussion options

You must be logged in to vote

Depending on what's on the state (Classes, Dates, circular references) and the method used for cloning, this method might not always work. Calling the function state() like in option stores always works.

$reset() is not that common to use. I personally never use it in my projects because I rarely need to reset a store. I might need to reset some values but rarely the whole store. But the real reason this is not in Pinia is to keep Pinia as lean as possible (1.5kb)

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@JollyBrackets
Comment options

@posva
Comment options

@hymair
Comment options

@posva
Comment options

@hymair
Comment options

Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants