Posted By: Anonymous
I am trying to build a simple app on polymer using predix, the problem I am facing is:
When the page reloads, the variables go back to their initial state, I am using those variables to show/hide content on navigation to other pages(.html files). I have one main .html file, where the variables are declared and has routes to all the files .
What are the ways to prevent this?
How can I do this better as I am planning to build another bigger and complex application, which will require users logging in and out?
Any information you need to store on the client should be written in localStorage. I personally prefer using redux with my state stored in localStorage. With this my users can continue to work exactly where they stopped.
Athentication is something else you need to implement a Refresh Token mechanism like Auth0 is providing.