Swapping instead of invalidating data on deferred props #2353
1000Reasons
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Comment component that will show all the comments for a specific post.
After adding a new comment I post the form to my controller and after using the only key, I only refresh my comments on the page.
Instead of invalidating the comments prop and falling back to the deferred fallback, I want the data to be fetched and swapped after the data has finished loading.
Currently I can't find any information about how to do this, and have not found any reliable way to "swap" data instead of invalidating and reloading the data, which is jarring for the user as it will hide all comments, show the loading fallback, and then render all the comments including the newest comment.
Beta Was this translation helpful? Give feedback.
All reactions