Posts

Post marked as solved
1 Replies
121 Views
I'm not even sure if "lifecycle" is the right term here. In my project, when certain views are not in my field of view for some time, I've noticed some views undergo state changes, some get sort of "unloaded". This results in multiple errors due to recurring queries expecting loaded variables or instances. I assumed that utilizing .onDisappear() to unload resources and .onAppear() to reload them as the window/view comes back into my field of view would address these issues. Unfortunately, these methods do not seem to be invoked after being out of sight or inactive for some time. Is there an effective strategy for managing the states of views under such circumstances? Additionally, is there a specific function that is triggered when the window enters a sort of "stasis" mode due to inactivity or loss of focus?
Posted
by silvermac.
Last updated
.