david-swift 1c50b3b923 Make lists dynamic
Make one @State always reference the same value
This is important when views with closures appear after the first render
2024-01-01 16:08:17 +01:00

34 lines
563 B
Markdown

**STRUCT**
# `State`
A property wrapper for properties in a view that should be stored throughout view updates.
## Properties
### `wrappedValue`
Access the stored value. This updates the views when being changed.
### `projectedValue`
Get the value as a binding using the `$` prefix.
### `content`
The stored value.
### `value`
The value with an erased type.
## Methods
### `init(wrappedValue:)`
Initialize a property representing a state in the view.
- Parameters:
- wrappedValue: The wrapped value.
### `updateViews()`
Update all of the views.