Currently working with vue.js and encountering the error message "Uncaught SyntaxError: let is disallowed as a lexically bound name". When trying to troubleshoot, I'm faced with a blank screen and this error appearing in the console.
I've searched online for solutions but haven't found anything useful so far.
This is the Vue code I am using:
let Task = {
props: ['task'],
template: `
<div>
<div class="tasks">
{{ task.body }}
</div>
</div>
`
},
let Tasks = {
components:{
'task': Task
},
data() {
return {
tasks: [
{id: 1, body: 'Task One', done: false }
],
}
},
template: `
<div>
<task></task>
<form action="">
form
</form>
</div>
`
},
let app = new Vue({
el:'#app',
components: {
'tasks': Tasks,
'task': Task
}
})