Skip to content
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

fix: upon modifying the information in the Inbox, the list failed to update promptly #761

Closed
wants to merge 2 commits into from

Conversation

cuikaipeng
Copy link
Contributor

Description

on the Discover page, when modifying information in the Inbox, the list does not update immediately after the modification is completed.

iShot_2024-10-05_15.56.55.mp4

Linked Issues

Additional context

…update promptly

on the Discover page, when modifying information in the Inbox, the list does not update immediately after the modification is completed.
Copy link

vercel bot commented Oct 5, 2024

@cuikaipeng is attempting to deploy a commit to the RSS3 Team on Vercel.

A member of the Team first needs to authorize it.

asWidget
id={inbox.id}
onSuccess={() => {
inboxes.refetch()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use optimistic update?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I'll optimize it

@Innei
Copy link
Member

Innei commented Oct 6, 2024

This implementation does not make sense. I will refactor later

@Innei Innei closed this Oct 6, 2024
@cuikaipeng
Copy link
Contributor Author

cuikaipeng commented Oct 6, 2024

This implementation does not make sense. I will refactor later

sorry to bother you, I would like to ask you for some advice. in useMutation, I handle optimistic updates through onMutate, is this “make sense“ ?
code like ⬇️ I have tested it, and it can be run this way.
iShot_2024-10-06_17 51 19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants