Skip to content

Instantly share code, notes, and snippets.

@SmartJSONEditor
Last active September 22, 2023 15:13
Show Gist options
  • Save SmartJSONEditor/e663c6c31b163c3e8bc22c684e768101 to your computer and use it in GitHub Desktop.
Save SmartJSONEditor/e663c6c31b163c3e8bc22c684e768101 to your computer and use it in GitHub Desktop.
// AFTER
@main
struct BookReaderApp: App {
/// Object is allocated in a global context.
@State private var library = Library()
var body: some Scene {
WindowGroup {
LibraryView()
.environment(library)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment