You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
757 B

import SwiftUI
import Todo
struct ContentView: View {
@State
private var componentHolder =
ComponentHolder {
TodoRootComponent(
componentContext: $0,
storeFactory: DefaultStoreFactory(),
database: DefaultTodoSharedDatabase(driver: TodoDatabaseDriverFactoryKt.TodoDatabaseDriver())
)
}
var body: some View {
RootView(componentHolder.component)
.onAppear { LifecycleRegistryExtKt.resume(self.componentHolder.lifecycle) }
.onDisappear { LifecycleRegistryExtKt.stop(self.componentHolder.lifecycle) }
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}