Can I perform mutations directly in strict mode?

Posted by Jennifer | Updated on

In strict mode, you can’t mutate state directly using v-model attribute. If you use v-model it throws an error because mutation is not performed inside an explicit Vuex mutation handler.

For example, the below input throws an error due to v-model usage:

In this case, you need to bind the ‘s value. It can be resolved using value attribute as below,

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers