|
@@ -6,14 +6,13 @@ export default class TodoList extends React.Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this.state = { items: [], inputText: "" };
|
|
|
-
|
|
|
this.handleChange = this.handleChange.bind(this);
|
|
|
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
|
this.addItem = this.addItem.bind(this);
|
|
|
this.deleteItem = this.deleteItem.bind(this);
|
|
|
this.completeItem = this.completeItem.bind(this);
|
|
|
}
|
|
|
- useEffect() {
|
|
|
+ componentDidMount() {
|
|
|
getTodoList().then((data) => {
|
|
|
this.setState({
|
|
|
items: data,
|