public TodoItemComponent() { InitializeComponent(); // Observe UI events CompleteButton.Events().Click .Subscribe(_ => Store.Dispatch(new CompleteTodoItemAction { Id = TodoItem.Id })); RevertCompleteButton.Events().Click .Subscribe(_ => Store.Dispatch(new RevertCompleteTodoItemAction { Id = TodoItem.Id })); RemoveButton.Events().Click .Subscribe(_ => Store.Dispatch(new RemoveTodoItemAction { Id = TodoItem.Id })); TextBox.Events().LostFocus .Subscribe(e => Store.Dispatch(new UpdateTodoItemAction { Id = TodoItem.Id, Content = TextBox.Text })); }