How to interact with data in local storage

Hello to all,

I had a long discussion with @Kabirdas on another post where we discussed setting up LocalStorage. (Wait data to start javascript transformer - #16 by Kabirdas)

I tried to do it and I think it's ok.
I put every function that calls data (API or DB) in localStorage to store that data.

2 questions arise now:
- how to know if the data in localstorage is up to date?
- how to interact with the LocalStorage because I have this function above that retrieves the 5 tables to merge them, and to retrieve it comes to check if they are implemented or call the data. And at each launch of the app, it comes to download them which takes time.

thank you for your help

Hi @Geool,

1) I'm not sure what you mean by up to date? Did you want to check if the local storage matches the most recent query results?

For example, if I load my app and the localStorage is already set to

But the new query data that the localStorage is referencing now has new information,

[1,2,4,5] instead of [1,2,3]

I may want to use some JS to update localStorage (this code would look different for a more complex example):

2) You can view the values under "Globals" in the left panel, and you can access the values you've set using (.setValue()) by calling localStorage.values.yourKeyName in any queries or component logic