Skip to content

Store adds reset function that helps reset to initial state #1666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

huybuidac
Copy link

Currently, there is no true way to reset to initial state.

Adding Reset function to do that.

Fixes: #1118

@huybuidac huybuidac reopened this Jan 12, 2020
@ktsn
Copy link
Member

ktsn commented Jan 12, 2020

We already can reset state without providing such functionality as I already mentioned in the original thread.
#1118 (comment)

@ktsn ktsn closed this Jan 12, 2020
@huybuidac
Copy link
Author

We already can reset state without providing such functionality as I already mentioned in the original thread.
#1118 (comment)

It is a common part that every project uses and the implementation is really simple.
I don't know why Vuex makes all developers clone and clone the initState function and reset mutations.

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

Successfully merging this pull request may close these issues.

Clear all stores or set them all to its initial state
2 participants