perf: task-fix-raf-derived-to-effect changes
This commit is contained in:
@@ -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?.()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user