Is there any way to call a data in without calling it from a app.callback?

I whant to use the data stored in, to use it in the script without having to do a callback, is this possible?

You want to use it on the JavaScript client side?

Are you planning on using it later in a callback?

I have not tried it yet … have other errors … but I think I might call it with a def using its id

Here are two ways that you can interact with localStorage without using the server callback.

The first is through a client_side callback:

The second is through straight javascript:

data = JSON.parse(localStorage.getItem("data"))

localStorage.setItem("data", JSON.stringify(data))

Javascript updates will become out of sync with the server, which will case issues for callback’s down the line. However, if you only plan on pulling data, then you shouldnt encounter issues.

1 Like

hi, I’ve tried with js, and don’t know how to … can you make an example for python without a callback?