Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<h1>{{ title }}</h1>
<h2>Add a new task</h2>
<input type="text"
placeholder="Add a new task"
<div v-if="newTask.length > 0">
<h3>New task preview</h3>
<p>{{ newTask }}</p>
<li v-for="task in tasks" :key="">
{{ }}. {{ }}
<div v-if="task.finished">
<button>Delete task</button>
export default {
data() {
return {
title: 'My To Do App',
newTask: '',
tasks: [
{ id: 1, name: 'Learn Vue JS', finished: false },
{ id: 2, name: 'Build a Vue application', finished: false },
{ id: 3, name: 'Write an article about Vue JS', finished: false }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment