You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/documentation/tutorial/08-stores/06-store-bindings/app-b/App.svelte

9 lines
191 B

<script>
import { name, greeting } from './stores.js';
</script>
<h1>{$greeting}</h1>
<input bind:value={$name} />
<button on:click={() => ($name += '!')}> Add exclamation mark! </button>