Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to have two tabs open using the same app without overwriting each others state? #34

Closed
josoroma-zz opened this issue Apr 15, 2021 · 2 comments

Comments

@josoroma-zz
Copy link

Hi!

I have this app where people needs to have one tab open as a user and another tab open as a admin... So I was wondering if it is possible to have two tabs open using the same application without overwriting the other's state?

Thank you!

@polemius
Copy link
Owner

Hi,

It is possible in your application to change the key for different user role?

const { persistAtom } = recoilPersist({
  key: isAdmin ? 'recoil-persist-admin' : 'recoil-persist-user',
})

@josoroma-zz
Copy link
Author

Thanks a bunch @polemius !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants