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.
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
Simplify native attachment gallery paging context and improve code #34080
Simplify native attachment gallery paging context and improve code #34080
Changes from 26 commits
4ce49a3
79bfaa3
391d035
be3c674
30313f2
51fbe58
3c4efb9
934bfd3
6be9adb
a712b07
4d7c3e3
3376f86
7195fdf
c5669dd
d2424d8
2cb2e3c
e4d30dd
860cc19
d469354
5c11456
9f0c0ac
d08b392
500c5cd
08d9a40
f9cac81
ada4c98
c0b21fc
a03d476
d9460c4
57676b4
0ec7d19
390fb5c
6af0ba1
66ec3e6
a3eb193
96e72c9
5b9d413
577110a
d8d8ac9
39a65a6
62651a0
d738e43
cfc6174
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Let's rename these to:
activePageIndex
setActivePageIndex
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.
This isn't a valuable comment IMO. The code is clear enough.
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.
As a general rule of thumb, code comments should explain why the logic is what it is, and comments that only explain what the code is doing are low-value.
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.
Rename this to something more descriptive (and lower case the variable name). Suggestion:
carouselItems
.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.
Why is
useMemo()
being used here? Is there a problem with rendering the content inline down below like it was before?