Skip to content

Instantly share code, notes, and snippets.

@cabreraalex
Last active June 25, 2021 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cabreraalex/6c1fdd9c1b6fc07836a5dbd619db5f1b to your computer and use it in GitHub Desktop.
Save cabreraalex/6c1fdd9c1b6fc07836a5dbd619db5f1b to your computer and use it in GitHub Desktop.
widget-svelte-example App.svelte
<script>
import { value } from './stores';
let localValue = $value;
</script>
<style>
h1 {
color: purple;
}
</style>
<h1>The value is: {$value}</h1>
<input bind:value={localValue} />
<button on:click={() => value.set(localValue)}>Set Value</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment