79734802

Date: 2025-08-13 22:54:46
Score: 2.5
Natty:
Report link

You are using the new Observation Framework (iOS 17 / Swift 5.9), and the problem is that @Environment gives you the LoginViewModel object itself, but it is not directly bound.

To use $loginVM.showApiAlert in .alert, you need a two-way binding, but you don't have it because $loginVM does not exist in this context. You can wrap a property in Binding directly in .alert.

Reasons:
  • No code block (0.5):
  • User mentioned (1): @Environment
  • Low reputation (1):
Posted by: Pavel L.