Skip to content

Instantly share code, notes, and snippets.

@niceaji
Last active November 11, 2023 11:02
Show Gist options
  • Save niceaji/7ce3771f4b38788440ddd060576dff47 to your computer and use it in GitHub Desktop.
Save niceaji/7ce3771f4b38788440ddd060576dff47 to your computer and use it in GitHub Desktop.
<script>
import Count from './Counter.svelte';
</script>
<h1>hello svelte</h1>
<Count />
<script>
let count = 0;
function handleClick() {
count += 1;
}
</script>
<button on:click={handleClick}>
Clicked {count}
{count === 1 ? 'time' : 'times'}
</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment