@State
A
property wrapper type
that can read and write a value managed by
SwiftUI
.
State | Apple Developer Documentation
A State instance isn’t the value itself; it’s a means of reading and writing the value.
To access a state’s underlying value, use its variable name, which returns the
wrappedValue
property value.