concept child in category svelte

appears as: children, Child, Child, The children
Svelte and Sapper in Action

This is an excerpt from Manning's book Svelte and Sapper in Action.

Note
<script>
  export const taxRate = 0.07;
 
  let price;
  let prices = [];
 
  $: total = prices.reduce((acc, n) => acc + n, 0);
 
  function add() {
    prices.push(price);
    prices = prices;       #1
    price = '';            #2
  }
 
  export const getGrandTotal = () => total * (1 + taxRate);
</script>
 
<input type="number" bind:value={price} />
<button on:click={add}>Add</button>
{#each prices as price}
  <div>{price}</div>
{/each}
<hr>
<label>Total {total}, Tax Rate {(taxRate * 100).toFixed(2)}%</label>

Another way to support page navigation is to use a side drawer. This is not provided in Native Script. It is an add-on that can be found in the Native Script UI library that is described in section 21.8. See the RadSideDrawer component.