perf: task-fix-raf-derived-to-effect changes
This commit is contained in:
parent
b10ea04cb3
commit
e33beee17d
2 changed files with 12 additions and 4 deletions
|
|
@ -348,11 +348,15 @@
|
|||
|
||||
elements.reverse()
|
||||
|
||||
requestAnimationFrame(manageScrollPosition)
|
||||
|
||||
return elements
|
||||
})
|
||||
|
||||
$effect(() => {
|
||||
if (elements.length > 0) {
|
||||
requestAnimationFrame(manageScrollPosition)
|
||||
}
|
||||
})
|
||||
|
||||
const start = () => {
|
||||
cleanup?.()
|
||||
|
||||
|
|
|
|||
|
|
@ -240,11 +240,15 @@
|
|||
|
||||
elements.reverse()
|
||||
|
||||
requestAnimationFrame(manageScrollPosition)
|
||||
|
||||
return elements
|
||||
})
|
||||
|
||||
$effect(() => {
|
||||
if (elements.length > 0) {
|
||||
requestAnimationFrame(manageScrollPosition)
|
||||
}
|
||||
})
|
||||
|
||||
const start = () => {
|
||||
cleanup?.()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue