File: app/components/test-todomvc/store/plugins.js

Recommend this page to a friend!
  Classes of Sergey Beskorovayniy  >  Vuex Examples  >  app/components/test-todomvc/store/plugins.js  >  Download  
File: app/components/test-todomvc/store/plugins.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Vuex Examples
Example apps using Vuex state management pattern
Author: By
Last change:
Date: 3 years ago
Size: 321 bytes


Class file image Download
define(['app/components/test-todomvc/store/mutations'], function (mutations) {

    var localStoragePlugin = function (store) {
        store.subscribe(function (mutation, todos) {
            window.localStorage.setItem(mutations.storage_key, JSON.stringify(todos))
    return [localStoragePlugin];