I'd like to access and modify temporary state from an app-level Javascript function (I'm in a mobile app). The reason is that I would like to define a few top-level utilities to manage temporary state, which I can then call from individual queries.
I tried to access the state by its name directly in an app-level function (e.g., state1), but that doesn't exist. I tried accessing the state from the window (i.e. window.state1), but that didn't exist either. I inspected the window object, but couldn't find any place where the temporary state might be stored.
Does anyone know how I can access temporary state from an app-level Javascript function?