-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
description
After svelte@5.24.0, even if implemented as described in https://signaldb.js.org/guides/svelte/ , items cannot be referenced correctly.
workaround is following: (Not sure if this is the proper fix, but this will work as before)
<script>
import { Collection } from "@signaldb/core";
+ let dep = $state(0);
const Posts = new Collection({
reactivity: {
create() {
- let dep = $state(0);
return {
depend() {
dep;
},
notify() {
dep += 1;
},
};
},
isInScope: () => !!$effect.tracking(),
},
});
let items = $state.raw([]);
// ...
</script>
reproduction
https://github.com/ykrods/svelte-reproduction-signaldb/tree/main
Metadata
Metadata
Assignees
Labels
No labels