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/packages/svelte/tests/runtime-runes/samples/manual-mount/inner.svelte

12 lines
379 B

<script>
import { createEventDispatcher, getContext } from "svelte";
let { count } = $props();
const multiply = getContext('multiply');
// Use legacy createEventDispatcher here to test that `events` property in `mount` works
const dispatch = createEventDispatcher();
</script>
<button onclick={() => dispatch('update', count + 1 * multiply)}>{count}</button>