title: Vuex: Preserve parts of the state when refreshing the browser
body: <p>I’m using Vue with Vuex. I’ve got the following problem: When the user presses the “refresh button” of the browser, the state in the Vuex store is reset to its initial values. However, I want to preserve the state. More precisely, I want to preserve only parts of the state, but not the whole one.</p>
  
  <p>Now I know there is a plugin called “vuex-persistedstate”. It’s this one:</p>
  
  <p><a href="https://www.npmjs.com/package/vuex-persistedstate" rel="nofollow noreferrer">https://www.npmjs.com/package/vuex-persistedstate</a></p>
  
  <p>There is also an option to preserve only parts of the states, but I don’t know how to do it precisely. For example, if we have a look at the jsfiddle</p>
  
  <p><a href="https://jsfiddle.net/robinvdvleuten/wmf8zvf8/" rel="nofollow noreferrer">https://jsfiddle.net/robinvdvleuten/wmf8zvf8/</a></p>
  
  <p>there is a variable called “count”. Assume we had another variable “newCount” in the state and I want to persist only newCount, but not count. What in detail do I have to write instead of <code>plugins: [createPersistedState()]</code>?</p>
  
  <p>Thank you very much for any help!</p>