sink
closure captures self
, self
holds subscriptions
What is the best practice to handle such cases? The point is it's good to unsubscribe when the view disappears and resubscribe when the view appears. But having an explicit model call inside onAppear
doesn't look like the best solution because the view has to know more than it should about the model lifecycle then.