public App() { var host = new HostBuilder() .UseContentRoot(Directory.GetCurrentDirectory()) .ConfigureServices((hostContext, services) => { services.AddSingleton <AppState>(); }) .Build(); host.AddComponent <TodoAppMainPage>(parent: this); }