-
Notifications
You must be signed in to change notification settings - Fork 397
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
Lazy pager (js side) #326
Merged
Merged
Lazy pager (js side) #326
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@troZee These JS changes are ready for review. |
3 tasks
troZee
requested changes
Apr 28, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left few comments. Also I checked it on emulators and it works.
Also I updated the next branch. Could you update your branch ?
I think, once you fix my comments, I will merge it.
alpha0010
force-pushed
the
js-lazy-render
branch
from
April 28, 2021 17:56
a129c3e
to
f030698
Compare
Co-authored-by: troZee <12766071+troZee@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Enables pages to be rendered on demand, instead of all at once. This is the JS specific changes. Several parts are commented out, awaiting the associated native changes.
Split from #279. Note that due to lack of native support (will be done in another pr), all pages prior to the current page will always be rendered. So starting in the middle/end of a large number of pages is not very efficient. Also, pager will not navigate to a page until the page is rendered (requires native support). This can lead to feeling stuck if swiping quickly through heavy pages.
Test Plan
What's required for testing (prerequisites)?
track-page-renders.patch
What are the steps to reproduce (after prerequisites)?
In the unmodified checkout, all examples should work the same as in
master
.In the patched checkout, logs in metro should show the basic example is rendering pages incrementally, instead of all ahead of time. Optionally add the prop
buffer={3}
(or some other number) to the pager view to change the prerender distance.Note that only the basic example has been converted to lazy loading. The other examples still use eager render (same as
master
).Compatibility
Checklist
README.md