0 votes
in VueJS by

What is the reason not to update the state directly?

1 Answer

0 votes
by

We want to explicitly track application state in order to implement tools that can log every mutation, take state snapshots, or even perform time travel debugging. So we need to commit a mutation instead of changing store's state directly.

...