mirror of https://github.com/sveltejs/svelte
parent
f05e1dbf6c
commit
376898f62d
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
let { count } = $props();
|
||||
</script>
|
||||
|
||||
{count}
|
@ -0,0 +1,7 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error:
|
||||
'ERR_SVELTE_NOT_BINDABLE: Cannot bind:count because the property was not declared as bindable. To mark a property as bindable, use let `{ count } = $props.bindable()` within the component.',
|
||||
html: `0`
|
||||
});
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Counter from './Counter.svelte';
|
||||
|
||||
let count = $state(0);
|
||||
</script>
|
||||
|
||||
<Counter bind:count />
|
Loading…
Reference in new issue