Improve memoization of page rendering

This commit is contained in:
schroda
2024-12-22 00:42:33 +01:00
parent 58c402dd0e
commit 34ad331a71
8 changed files with 178 additions and 135 deletions

View File

@@ -36,8 +36,10 @@ const BaseReaderHorizontalPager = ({
createPage={(page, pagesIndex, shouldLoad, _, setRef) =>
createReaderPage(
page,
() => onLoad?.(pagesIndex),
() => onError?.(page.primary.index),
pagesIndex,
true,
onLoad,
onError,
shouldLoad,
true,
currentPageIndex,