-
Notifications
You must be signed in to change notification settings - Fork 128
infinite scroll for new members #397
base: develop
Are you sure you want to change the base?
Conversation
83ff59b to
ef62093
Compare
| useEffect(() => { | ||
| fetchNewMembers(); | ||
| }, [newMembersList]); |
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.
we can add the fetchNewMembers function in the dependency array as pointed out in the warning by GitHub actions.
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.
Can you please tell me why we need to provide this function in the dependency array?
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.
Since the hook is dependent on the function, I thought we can add it. what do you think @sumitd94 @swarajpure ?
| const { dev } = query; | ||
| const [isOptionKey, setIsOptionKey] = useState(false); | ||
| const [newMembers, setNewMembers] = useState([]); | ||
| const [scrollCount, setScrollCount] = useState(0); |
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 do we need this scroll count?
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.
We need this count to update the array of new members to show after every scroll and we are using it inside fetchNewMembers function.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
7d1ae3c to
fb0d052
Compare
What is the change?
Closes #391
Implemented infinite scroll for new members
Is it bug?
No
*Dev Tested?
Yes
*Tested on:
Platforms
Browsers
Before / After Change Screenshots
Untitled.1.mp4