Cannot assign to property: 'self' is immutable?

Understanding how structs and mutation applies in regular Swift does not automatically mean an understanding of how they apply in SwiftUI. SwiftUI has its own ideas about these concepts, and yes, it can be difficult to follow.

The example you give makes heavy use of SwiftUI-specific types, making it difficult to determine if this is a language question or not. If you can reduce it to a non-SwiftUI example, that would help.

I understand that many are unhappy with the Apple developer forums. You can also try StackOverflow or another site - but this site in particular has been asked not to provide support for SDK frameworks, and to instead direct developers to the ADF.