-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What happened to LazyPagerView
?
#801
Comments
@MoritzCooks hope it clarifies the situation #673. |
Thanks for the clarification! |
@MoritzCooks Could you please share the workound for the lazy loading for not rendering all compoents |
@MoritzCooks would love to see the workaround too, can you please post an example? Thanks! |
Oh sorry for responding so late @dareman-venkat and @efstathiosntonas . I just adjusted the implementation to be a bit easier to understand. But that's basically it, just a bit stripped down: const [page, setPage] = useState(0);
return (
<PagerView
offscreenPageLimit={2}
initialPage={0}
onPageSelected={({ target }) => setPage(target)}
>
{screens?.map((screen, index) => (
<OnboardingScreen
key={screen.id}
shouldRender={index >= page - 1 && index <= page + 1}
{...screen}
/>
))}
</PagerView>
);
|
Ask your Question
I just found the issue #227 about preventing render for all pages at once. In the issue there is a PR mentioned that provides
LazyPagerView
component and it's also reference to 6.0.0-rc but it's not part of version 6.2.3Is this available now or not (any more)?
Currently I have to prevent rerendering of all pages.
Thanks for clarification.
The text was updated successfully, but these errors were encountered: