How do I store details of users in frontend when they sign in?

I was wondering is it wise to store users details like name pictures and other general information in frontend after fetching the data once from the database when they sign in. And what will be the effective way of doing that?
2 Replies
sapatchy
sapatchy4mo ago
For now I am using redux to store the detail in a state.
13eck
13eck4mo ago
If you don’t want/need it to persist then a global variable (state) is how you do it. I’d you want the data to persist even after closing and reopening the page then you’ll want to look at local storage. Basically you stringify a JSON value and the browser saves it. For images you’ll want to save the URL and not the image itself