In my app I have state shared with background code (temporal event handler and callbacks) and non-background code (update, draw etc. handlers).
Currently I'm using `getProperty` and `setProperty` to access that state in background and foreground code, but as I understand it this is not the right way to do it. I'm wondering how to best do it.
For the state that are only used in background code I can add `(:background)` to the variables and that should work? (I haven't tried this)
Normal `var`s work with the foreground code.
What if I want `var`s that will be updated and read by both the background and foreground code? What is the right way to implement this?