This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@main | |
struct AsyncTestApp: App { | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
.environmentObject(State()) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import UniformTypeIdentifiers | |
struct Square: View { | |
let id: String | |
let fillColor: Color | |
var body: some View { | |
Rectangle() | |
.fill(fillColor) | |
.frame(width: 100, height: 100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
struct HistoryItem: Equatable { | |
let action: Int | |
let state: String | |
init(action: Int, state: String) { | |
self.action = action | |
self.state = state | |
} |