Extract some code to Todo react component.