If you have something like:
#Preview {
let viewModel = ViewModel()
MyView(viewModel: viewModel)
}
and MyView is actually used elsewhere, viewModel is called out as unused. I'd rather not enable retain-swift-ui-previews because then if MyView is actually unused, it wouldn't get called out as unused.
The ideal situation is viewModel is not called out as unused, bc it is technically used in the preview.
If you have something like:
and
MyViewis actually used elsewhere,viewModelis called out as unused. I'd rather not enableretain-swift-ui-previewsbecause then ifMyViewis actually unused, it wouldn't get called out as unused.The ideal situation is
viewModelis not called out as unused, bc it is technically used in the preview.