When should I use Vuex?

前端 未结 4 710
梦毁少年i
梦毁少年i 2020-12-07 00:02

Now I start to learn vue, and I\'m creating SPA for editing database. Now I can\'t understand where I should use a Vuex. I can use props and $emit everywhere an

4条回答
  •  再見小時候
    2020-12-07 00:44

    Look at the vuex documentation; it describes all the reasons why/when you want to use vuex https://vuex.vuejs.org.

    For instance, multiple components require the same information, controlling mutations, validations, etc.

提交回复
热议问题