-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Articles not appearing as bookmarked in some cases #882
Comments
@JohnAllenTech can you plz assign this issue to me? and also add hacktoberfest label to this |
I assigned you @hrit2773 |
@hrit2773 |
@John-Paul-Larkin Yes I'm still working on this is it ok if I make a PR by this week itself. |
@John-Paul-Larkin I would like to share my progress and get the PR done by today if you approve. Actually what's happening is that as Next.js uses caching it always shows the previous loaded page when articles route is hit back. The bookmarked value is consistently updated in the database so no problems with the data. What we can do is we can always try to refetch the status of all articles when the articles page is mounted or even if the popstate event is made. That is the solution to this bug. Your thoughts? |
|
Uh oh! @hrit2773, the image you shared is missing helpful alt text. Check #882 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
1 similar comment
Uh oh! @hrit2773, the image you shared is missing helpful alt text. Check #882 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
Hi @hrit2773 |
invalidating the cache when an article is bookmarked seems like the way to go to me |
👌 queryClient.invalidateQueries({ queryKey: ['bookmarks'] }) A query key should be added to the bookmarks query. |
@JohnAllenTech yup nice Idea and it will be a better way. I'll make a pr by today and close it |
hi @hrit2773! did you get the chance to finish this? If you did could you tag the PR here? thanks |
Context
Please provide any relevant information about your setup
Expected Behavior
Post should appear as bookmarked without a refresh
Current Behavior
Post doesnt show as bookmarked with a refresh
Screenshots
e3e11a59-ffc3-401c-b122-1b1d85549a03.mp4
Steps to reproduce
Please provide detailed steps for reproducing the issue
Additional info
Provide any additional information here
The text was updated successfully, but these errors were encountered: