Restrict vue/vuex reactivity

后端 未结 3 1833
忘了有多久
忘了有多久 2020-12-15 12:57

Let\'s assume we have some array of objects, and these objects never change. For example, that may be search results, received from google maps places api - every result is

3条回答
  •  臣服心动
    2020-12-15 13:22

    I created a fork out of vue called vue-for-babylonians to restrict reactivity and even permit some object properties to be reactive. Check it out here.

    With it, you can tell Vue to not make any objects which are stored in vue or vuex from being reactive. You can also tell Vue to make certain subset of object properties reactive. You’ll find performance improves substantially and you enjoy the convenience of storing and passing large objects as you would normally in vue/vuex.

提交回复
热议问题