polemius/recoil-persist

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

josoroma-zz opened this issue · 2 comments

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!

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',
})

Thanks a bunch @polemius !