DEV Community

Discussion on: Help Help Help 😆

Collapse
 
jacksonkasi profile image
Jackson Kasi • Edited

You can store user ID in cookies or localStorage once user login. If anyone( user ) open/ refresh your website, you will request user data by user ID, and handle the user data( ex: using redux or something ) on your website. 🙂

Collapse
 
shubhamtiwari909 profile image
Shubham Tiwari

So on log out i have to clear the cookies?

Collapse
 
jacksonkasi profile image
Jackson Kasi • Edited

If the user logout, you should definitely clear cookies, else don't!

Thread Thread
 
shubhamtiwari909 profile image
Shubham Tiwari

okay Thank you