-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat: <ItemsList />
with cursor-based pagination
#445
Conversation
<ItemsList />
<ItemsList />
with cursor-based pagination
const itemsSig = useSignal<Item[]>([]); | ||
const votedItemsIdsSig = useSignal<string[]>([]); | ||
const cursorSig = useSignal(""); | ||
const isLoadingSig = useSignal(false); |
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'm curious why useSignal
is used here instead of useState
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.
Good question! For context: https://preactjs.com/blog/introducing-signals/
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.
LGTM
This change contains a few changes that affect interdependent features. Changes include:
<ItemsList />
with cursor-based paginationvalues
fieldfetchValues()
<VoteButton />
DELETE/GET /api/items/[id]/vote
endpointGET /api/me/votes
endpointNote: The migration script has been tested successfully locally.
Closes #427
Closes #414
Towards #439