Back

Doubt regarding deleteSessions() [RTK]

  • 1
  • Users
  • Accounts
  • Web
Yashwanth
2 Jan, 2024, 08:14

Hey folks i have a doubt . why does redux store re-initializes when i logout (i.e. when i call deleteSessions). Is it default, like how Appwrite works or my code problem

TL;DR
User is experiencing an issue where the Redux store is resetting when logging out and calling `deleteSessions()`. They are unsure if this is the default behavior of Appwrite or if there is a problem with their code.
Yashwanth
2 Jan, 2024, 08:18

Doubt regarding deleteSessions() [RTK]

ideclon
2 Jan, 2024, 13:14

I don’t know anything about Redux, but are you doing some kind of account check (account.get()) on the page? If so, I’d guess this is Appwrite?

Yashwanth
2 Jan, 2024, 19:12

@ideclon Yes with useEffect

Yashwanth
2 Jan, 2024, 19:13

Calls account .get() as soon as webpage loads.

Yashwanth
2 Jan, 2024, 19:13

I just want to check if user is logged in before showing them home page

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more