问答详情
源自:3-5 vuex介绍

vuex中store.state.count 通过localstore 也是也是实现的

vuex中store.state.count  通过localstore 也是也是实现的,

store 和  localstore.setItem 使用上有什么区别?

使用场景都是什么样的?

提问者:慕的地9204434 2019-09-22 11:29

个回答

  • Brian
    2019-09-22 23:13:52
    已采纳

    store在内存中,localstorage是本地缓存文件中,如果刷新浏览器store会被清除,而localstorage如果没有去删除的话,则一直存在。