Objects saved in Local Storage
I understand that local storage items are stored as strings . If I wanted to store a user object that contained a name , email , and role into a single local storage item , I believe I have to stringify it when I save it then parse it when I retrieve the data (hopefully this is correct ) . How would this be done in a toddle formula ? I see things like Parse JSON and String . I haven 't been able to get it to behave the way I would like . And lastly , would this be secure ? Again , I don 't intend to store sensitive data I just don 't want to have to poll an API ever time I change pages . But it 's a standard key value store so it should work We just released formulas /actions for working with local and session storage 😊 https://discord.com/channels/972416966683926538/972416966683926541/1174257744031780914 And they ’re already stringifying /parsing when saving /reading so you can save objects and arrays . Reg . security , I would recommend saving something like non sensitive user preferences /selected filter values etc . But if you have public data that you want to persist across pages , that ’s also a good use case 👍 👍1Thanks @Erik Beuschau - and one last question sort of off topic . . Instead of storing user data in local or session storage , it seems better to store it in a variable . I know there can be variables set on components and pages . Is there a concept of app variables that can be set once and used throughout the application ?
.jpeg/public)