title: Is it safe to persist Vuex state on sessionStorage?
body: <p>I'm working on a web app using Vue.js/Vuex and when the user refreshes the page the state is lost.</p>
  <p>I'm trying to persist some states in <code>sessionStorage</code>, but I realized that a user can edit it and for example make a state <code>true</code> and turn it into <code>false</code>.</p>
  <p>My question(s) are:</p>
  <p>Can a user edit the <code>sessionStorage</code>?</p>
  <p>Is it safe to store a state in a <code>sessionStorage</code>?</p>
  <p>Can I persist the state in another way without adding another dependency on the project?</p>
  <p><strong>--------------UPDATE-----------------</strong></p>
  <p>For people with a similar problem I solved using <a href="https://router.vuejs.org/guide/advanced/navigation-guards.html" rel="nofollow noreferrer">beforeEnter and beforeEach</a> so instead of trying to persist the state I go to a backend endpoint everytime the route changes (with beforeEach) and every page refresh (with beforeEnter).</p>
  <p>Thanks to everyone for the helpful responses!</p>