79430572

Date: 2025-02-11 15:58:33
Score: 1.5
Natty:
Report link

It looks like the issue is with how $derived works in Svelte 5. Since splitItems is derived from items.splice(0, 5), it won't update reactively because splice mutates the array instead of returning a new one. Try using slice instead:

let splitItems = $derived(() => items.slice(0, 5));

This ensures splitItems updates when items changes. Also, make sure you're passing a reactive store or using $state correctly in the child. Let me know if this helps!

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: adilhassan