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 server pending bug + clean up #83

Merged
merged 4 commits into from
Aug 11, 2022
Merged

fix server pending bug + clean up #83

merged 4 commits into from
Aug 11, 2022

Conversation

mikabusante
Copy link

closes #82, I was previously pulling the initial query data from the query cache, but it seems this is not shared between locales. Also trying to clean up the code a bit by moving any data transformations into the select option (reference)

@vercel
Copy link

vercel bot commented Aug 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
joinmastodon ✅ Ready (Inspect) Visit Preview Aug 11, 2022 at 2:19PM (UTC)

@mikabusante
Copy link
Author

also very extremely excited to learn that react-query has a keepPreviousData option, which shows the last data in place of a loading state.....was trying to figure this out with useRef as we had before but rlly nice that this is built in https://tanstack.com/query/v4/docs/guides/migrating-to-react-query-3#usepaginatedquery-has-been-deprecated-in-favor-of-the-keeppreviousdata-option

@danielgamage
Copy link
Member

this looks great—good finds on caching. do you think we can reuse the language filter while we load new data too? it's causing a layout shift when changing categories

Screen.Recording.2022-08-11.at.11.58.26.mov

@mikabusante
Copy link
Author

mikabusante commented Aug 11, 2022

oo is this on preview rn? thought i fixed this in 8fe3e90 by reworking the apiLanguages.isSuccess check?? (the component always renders but only the options change when the data is updated)

@danielgamage
Copy link
Member

you know... i thought it was but i can't repro, so maybe i was looking at another branch's preview. sorry for the false alarm!

@mikabusante
Copy link
Author

no worries, ty for looking! :) gonna merge this!!

@mikabusante mikabusante merged commit 7bfc3d7 into main Aug 11, 2022
@mikabusante mikabusante deleted the server-pending-bug branch August 11, 2022 16:43
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.

/servers filters can get stuck in a pending state
2 participants