|
@@ -86,7 +86,7 @@ Since a Vuex store's state is made reactive by Vue, when we mutate the state, Vu
|
|
|
|
|
|
- Use `Vue.set(obj, 'newProp', 123)`, or
|
|
- Use `Vue.set(obj, 'newProp', 123)`, or
|
|
|
|
|
|
- - Replace that Object with a fresh one. For example, using the stage-3 [object spread syntax](https://github.com/sebmarkbage/ecmascript-rest-spread) we can write it like this:
|
|
|
|
|
|
+ - Replace that Object with a fresh one. For example, using the [object spread syntax](https://github.com/sebmarkbage/ecmascript-rest-spread) we can write it like this:
|
|
|
|
|
|
``` js
|
|
``` js
|
|
state.obj = { ...state.obj, newProp: 123 }
|
|
state.obj = { ...state.obj, newProp: 123 }
|