Issue #2: Moved local SwiftUI state to a view model.
This commit is contained in:
parent
3ec25bc247
commit
6b253a6843
4 changed files with 42 additions and 17 deletions
16
dns/DnsApp.swift
Normal file
16
dns/DnsApp.swift
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct DnsApp: App {
|
||||
|
||||
@StateObject
|
||||
var viewModel = ViewModel()
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
HomeView()
|
||||
.environmentObject(viewModel)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue