TodoApi.deleteTodo(id). then(function() { AppDispatcher.dispatch({ actionType: TodoConstants.TODO_DESTROY, id: id }); }). catch(function(err) { console.log('Error deleting todo.'); console.log(err); });
case TodoConstants.TODO_DESTROY: destroy(action.id); TodoStore.emitChange();
case TodoConstants.TODO_DESTROY: _history.push(_todos); destroy(action.id);
}; var actionTodoDestroy = { actionType: TodoConstants.TODO_DESTROY, id: 'replace me in test' };
case TodoConstants.TODO_DESTROY: destroy(action.id); TodoStore.emitChange();
}; var actionTodoDestroy = { actionType: TodoConstants.TODO_DESTROY, id: 'replace me in test' };