Zustand leaking state

In the app, we have an event page that contains multiple views. Normal users only see the default view, but special permissions give access to the other views, and we control the state of this page with Zustand. This is basically the zustand structure for this. This has always worked fine, the state is always set to default on first render, so there shouldn't be a problem. However, today we had a user report that they were able to see a page from one of the hidden states. This happen because he had permission in a previous page, then the state "leaked" to this page
No description
1 Reply
deforestor
deforestor10mo ago
But here's the thing: not only we've never seen that happen before, but we also don't know how to reproduce I tried: - Having both tabs open (one in a page I have permissions, another where I don't) didn't work - While in the page with permissions, I click on one of the views and quickly try to change to the other page.. also nothing - Editing the localStorage: obviously didn't work So if anyone understands a lot about Zustand, can you tell me how I could try to force this "state leak"? I'm out of ideas
Want results from more Discord servers?
Add your server