Build the basics – a Todo application

To start off our Todo application, let's go ahead and utilize the template that we already have. Now, in most Todo applications, we want to be able to do the following things:

  • Add
  • Remove/mark complete
  • Update

So what we have is a basic CRUD application without any server operations. Let's go ahead and write the Svelte HTML that we would expect for this application:

<script>    import { createEventDispatcher } from 'svelte';    export let completed;    export let num;    export let description;    const dispatch = createEventDispatcher();</script><style>    .completed {        text-decoration: line-through;    }</style><li class:completed>    Task {num}: {description}    <input type="checkbox" bind:checked={completed} /> <button on:click="{() ...

Get Hands-On JavaScript High Performance now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.