I am working on a project with vuejs3. I need to save some data somewhere globally and call another page. I was using local storage for this, but this doesn't feel right and it gets harder to manage as the project grows.
at user login
lookie.set("userType", "student")
at another component
lookie.get("userType")
For example, there are two user types as student and teacher in the project, I keep their user type in the local storage at the user login, and I do not display some components if the user type in the local storage is student. I used the state structure, but it didn't work for me because it reverts to its default value when the page is refreshed. What kind of structure do you think I should set up?