<script>
import axios from 'axios';
export default {
name: 'taskListComponent',
data: () => ({
tasks: [],
errors: []
}),
created(){
axios.get('/api/tasks_list')
.then(response => {
this.tasks = response.data;
})
.catch(e => {
this.errors.push(e)
});
console.log(tasks);
},
}
</script>