A
A
Andrey Sobolev2020-10-16 08:56:22
Vue.js
Andrey Sobolev, 2020-10-16 08:56:22

Can someone explain in simple language on the fingers what mutations are in Vue?

I watched the video several times - I could not enter. Apparently I'm a baker

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
reinmaker90, 2020-10-16
@andrufka46rus

I also can't be plastic in terms of the susceptibility of information about programming, but this article explains everything intelligibly if the documentation is not clear

A
approximate solution, 2020-10-16
@approximate_solution

What video?)
Where is it even easier to explain what it says in the Vue doc? Kind of chewed up:
https://vuex.vuejs.org/en/guide/mutations.html
Terminology
In short: your state is stored in an object called a store. To change the state, you use actions and mutations, which are also stored in the state.
Mutations
To update the state, you need to make a mutation. Mutation doesn't care about business logic, its only purpose is to update the state . The mutation is synchronous (your code must wait until the mutation is complete).Mutations should be the only way to update your state in order to ensure predictable state management

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question