brew install rustup
rustup-init
# new shell for env (or source .cargo/env), then:
rustup target add wasm32-wasi
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
/** | |
* An Observable property wrapper that only creates the observable | |
* value once. | |
* | |
* Example: | |
* ```swift | |
* @Observable class Item { | |
* } | |
* | |
* struct MyView: View { |
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 | |
struct Item: Identifiable { | |
let id = UUID() | |
let title = "Hello" | |
} | |
let items = [ | |
Item(), Item(), Item(), Item(), Item(), Item(), Item(), Item(), Item(), Item(), Item(), | |
Item(), Item(), Item(), Item(), Item(), Item(), Item(), |
OlderNewer