Make one @State always reference the same value This is important when views with closures appear after the first render
15 lines
279 B
Swift
15 lines
279 B
Swift
//
|
|
// StateProtocol.swift
|
|
// Adwaita
|
|
//
|
|
// Created by david-swift on 09.09.23.
|
|
//
|
|
|
|
/// An interface for accessing `State` without specifying the generic type.
|
|
public protocol StateProtocol {
|
|
|
|
/// The class storing the value.
|
|
var content: State<Any>.Content { get }
|
|
|
|
}
|