mirror of https://github.com/sveltejs/svelte
fix: improve non state referenced warning (#9809)
* fix: improve non state referenced warning * add testpull/9816/head
parent
d793d570e2
commit
d5167e75b9
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: improve non state referenced warning
|
@ -0,0 +1,3 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({});
|
@ -0,0 +1,6 @@
|
||||
<script>
|
||||
let a = $state({b: 0});
|
||||
</script>
|
||||
|
||||
<button onclick={() => a.b += 1}>a += 1</button>
|
||||
<p>{JSON.stringify(a)} + {a.b}</p>
|
Loading…
Reference in new issue