#SwiftUI debugging question:
How do you inspect why Environment changes don't seem to propagate?
– I have an action in the environment (struct, usedvia `callAsAction()`). I set it up with a closure to toggle() a boolean State variable.
– I also put the State variable into the environment.
So the environment has both the toggle and a getter. It's basically a global variable.
This worked in isolation and previews, but not from the `App`.
@ctietze difficult to say without seeing the rest of it, but this setup definitely works: https://gist.github.com/phillipcaudell/6e2494aa7128997f9df2a4d58073aded
@ctietze I’ve noticed environment values stop being propagated in certain controls (usually Hosting/AnyView). Is the environment’s default handler being called instead of the one you’ve set? If so perhaps try explicitly setting the environment at each level to find where it breaks? Otherwise good old printChanges?