@latest_post
TIL: How to reset all stores in Pinia
I just learned that every Pinia store has a $reset function.
To reset all in-use stores you just need to:
import { getActivePinia } from 'pinia'
const pinia = getActivePinia()
pinia._s.forEach((store) => store.$reset())
3 : https://stackoverflow.com/questions/71690883/pinia-reset-alternative-when-using-setup-syntax "Pinia: $reset alternative when using setup syntax" -->