import React from "react"
import { Link } from "react-router-dom"
import axios from "axios"
const Todo = props => (
| {props.todo.todo_description} |
{props.todo.todo_responsible} |
{props.todo.todo_priority} |
Edit
|
)
export default class TodosList extends React.Component {
constructor(props) {
super(props);
this.state = { todos: [] };
}
componentDidMount() {
axios.get('http://localhost:4000/todos/')
.then(response => { this.setState({ todos: response.data }) })
.catch( error => { console.log(error) })
}
todoList() {
return this.state.todos.map((currentTodo, item) => {
return
})
}
render() {
return (
Todos List
| Description |
Responsible |
Priority |
Action |
{ this.todoList() }
)
}
}