pull/12482/head
Dominic Gannaway 2 years ago
parent 3328f787e3
commit 465f48ebc2

@ -0,0 +1,7 @@
<script>
let { object = $bindable() } = $props();
</script>
<button onclick={() => object.count += 1}>
clicks: {object.count}
</button>

@ -0,0 +1,13 @@
import { test } from '../../test';
export default test({
html: `<button>clicks: 0</button>`,
compileOptions: {
dev: true
},
warnings: [
"The `object` prop was passed an object that isn't reactive yet was marked as bindable. The object should be either made reactive using `$state` or should contain properties that have a `set` accessor."
]
});

@ -0,0 +1,5 @@
<script>
import Component from './Component.svelte';
</script>
<Component object={{ count: 0 }} />
Loading…
Cancel
Save