Slide 28
Slide 28 text
ࣗ࡞ΞʔΩςΫνϟͷ࣮
7JFX4UBUFͷ,FZ1BUI͔Β.Z7JFXͷ,FZ1BUIͱมͰ͖ΔLFZ1BUI.BQΛఆٛ ޙ΄Ͳ༻
@ViewState
struct MyView: View {
@State var count = 0
@State var isLoading = false
var body: some View {
EmptyView()
}
internal struct ViewState: ViewStateProtocol {
var count = 0
var isLoading = false
internal static let keyPathMap: [PartialKeyPath: PartialKeyPath] = [
\.count: \.count,
\.isLoading: \.isLoading
]
}
}
extension MyView: ActionSendable {
}