D
D
Denioo2020-07-02 08:45:26
Vue.js
Denioo, 2020-07-02 08:45:26

How to change an existing state in vuex?

I get the state from the server, then in the component I call the action and getter and display the state values ​​in the fields using v-model, but if I want to change something in the already loaded state, then what is the best way for me to do this? Create a local (data) state and load a getter into it, and then bind a local state to v-model, or is it possible to somehow change the state without creating a local state and send it? Or is there some better way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-07-02
@Denioo

The computed property whose setter will trigger the mutation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question