You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We useSWRInfinite to implement cursor-based pagination. However, we need nested pagination in order to show more than 100 replies (the limit) to a comment. I haven't found an "easy" way to implement it with SWR. The key is to handle SWR key (heh) elegantly so that it can keep track of the pages correctly.
Thus, we might need to evaluate other data-fetching libraries such as react-query.
Or... we could fetch the remaining replies separately as a state for the Comment. Hmm...
Still... what kind of comment would get more than 100 replies anyway? 🤣
The text was updated successfully, but these errors were encountered:
We
useSWRInfinite
to implement cursor-based pagination. However, we need nested pagination in order to show more than 100 replies (the limit) to a comment. I haven't found an "easy" way to implement it with SWR. The key is to handle SWRkey
(heh) elegantly so that it can keep track of the pages correctly.Thus, we might need to evaluate other data-fetching libraries such as react-query.
Or... we could fetch the remaining replies separately as a state for the
Comment
. Hmm...Still... what kind of comment would get more than 100 replies anyway? 🤣
The text was updated successfully, but these errors were encountered: