<button on:click={toggleHandler}>Show Modal</button>
        {#each people as person (person.id)}
            <div>
                <h4>{person.name}</h4>
                <p>{person.age} years old, {person.beltColour} belt.</p>
                <button on:click={() => handleClick(person.id)}>Delete</button>
            </div>
        {:else}
            <p>There are no people to show...</p>
        {/each}

      Javascript language logo
      showModals

      CodeSnippets

      <button on:click={toggleHandler}>Show Modal</button>

      {#each people as person (person.id)} <div> <h4>{person.name}</h4> <p>{person.age} years old, {person.beltColour} belt.</p> <button on:click={() => handleClick(person.id)}>Delete</button> </div> {:else} <p>There are no people to show...

      Shortcut: showModals.svelte

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.