We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe85a42 commit 3fff85fCopy full SHA for 3fff85f
src/index.js
@@ -129,6 +129,18 @@ export class Store {
129
this._setupModuleMutations(modules || this._modules)
130
}
131
132
+ /**
133
+ * Replace entire state tree.
134
+ */
135
+
136
+ ___replaceState (newState) {
137
+ const state = this._vm._data
138
+ const clone = deepClone(newState)
139
+ Object.keys(clone).forEach(key => {
140
+ state[key] = clone[key]
141
+ })
142
+ }
143
144
/**
145
* Attach sub state tree of each module to the root tree.
146
*
0 commit comments