A [[SwiftUI]] view is a struct that inherits the [[SwiftUI View Protocol|View Protocol]]. They are used to define (in a [[Declarative User Interface Design|declarative way]]) how the information should be presented on screen.
## Views are structs
Even though we could expect them to be classes (as they were in [[UIKit]]), they are structs mostly because of their speed and simplicity.
If you inherit a class, they can have plenty of values and methods stored that you may not be expecting. If your struct holds an integer, there is only that single integer in it, and is therefore almost free to create.
However, it also **forces the developer to think about state isolation**: classes can be modified at any point, but structs cannot. That's why it's possible for [[SwiftUI]] to refresh views each time a [[@State Property Wrapper in SwiftUI|stateful property]] is modified.