A user logs out, another logs in on the same device - and suddenly sees the previous user's cart or permissions. Whether you have 3 stores or 20, resetting state on logout is a critical task that often falls through the cracks. Why the "Typical" Reset Fails The most common approach is usually: reset: () => set(initialState) . However, this fails in four specific ways: Frozen dynamic values : If you have sessionId: crypto.randomUUID() , it was generated once at module ...