perf: task-fix-raf-derived-to-effect changes

This commit is contained in:
Jon Staab
2026-04-10 11:36:35 -07:00
parent b10ea04cb3
commit e33beee17d
2 changed files with 12 additions and 4 deletions
+6 -2
View File
@@ -348,11 +348,15 @@
elements.reverse()
requestAnimationFrame(manageScrollPosition)
return elements
})
$effect(() => {
if (elements.length > 0) {
requestAnimationFrame(manageScrollPosition)
}
})
const start = () => {
cleanup?.()
+6 -2
View File
@@ -240,11 +240,15 @@
elements.reverse()
requestAnimationFrame(manageScrollPosition)
return elements
})
$effect(() => {
if (elements.length > 0) {
requestAnimationFrame(manageScrollPosition)
}
})
const start = () => {
cleanup?.()