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/test/runtime/samples/binding-no-unnecessary-inva.../main.svelte

18 lines
281 B

<script>
import { writable } from "svelte/store";
import Tab from "./Tab.svelte";
let i = 0;
const { set, subscribe } = writable({ id: 1, name: "tab1" });
const tab = {
set(value) {
i++;
set(value);
},
subscribe,
};
</script>
<Tab bind:tab={$tab} />
<p>{i}</p>