Instance Method

update()

Updates the value of the property prior to populating the view.

Declaration

mutating func update()

Discussion

SwiftUI calls this method immediately before computing the view’s body. This ensures that properties have valid values before body uses them.