title: Pinia: $reset alternative when using setup syntax
body: <p>I have a pinia store created with setup syntax like:</p>
  <pre class="lang-js prettyprint-override"><code>defineStore('id', () =&gt; {
    const counter = ref(0)
    
    return { counter }
  })
  </code></pre>
  <p>Everything has been working great with setup syntax because I can re-use other pinia stores.</p>
  <p>Now, however, I see the need to re-use Pinia stores on other pages but their state needs to be reset.</p>
  <p>In Vuex for example, I was using <code>registerModule</code> and <code>unregisterModule</code> to achieve having a fresh store.</p>
  <h3>So the question is: How to reset the pinia store with setup syntax?</h3>
  <p><em>Note: The <code>$reset()</code> method is only implemented for stores defined with the object syntax, so that is not an option.</em></p>
  <p><em>Note 2: I know that I can do it manually by creating a function where you set all the state values to their initial ones</em></p>
  <p><em>Note 3: I found <a href="https://pinia.vuejs.org/api/interfaces/pinia._StoreWithState.html#dispose" rel="nofollow noreferrer">$dispose</a> but it doesn't work. If $dispose is the answer, then how it works resetting the store between 2 components?</em></p>