-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Optimistic query #423
Comments
In case anyone is not convinced by reading your example, I have one that at least convinced me (taken from https://levelup.gitconnected.com/optimistic-updates-in-react-803003844cb0):
|
@iwan-uschka hmm, but this example isn't about optimistic updates already implemented in this lib? Dragging card is probably a mutation, which already has optimistic support. You can even see this in action in the readme - showcase example, where you do dnd with react beautiful dnd, with optimistic update it looks cool, but without it, you have this weird effect after releasing the button, for example if you have order |
Sorry!! Like i mentioned in #432 (comment) i just discovered some features in this lib. I'll stop posting until i fully reread the docs (which i haven't done for quite a while, it seems). |
@iwan-uschka no worries, perhaps it would be easier for you to analyze https://github.com/klis87/redux-requests/releases , then you will quickly see what's new :) |
It could be beneficial to add something like optimistic query. It would allow to update
data
before query response, which could be known in advance.Use case? For example server side pagination, imagine you have
currentPage
indata
, if you pass it to a pagination component, then it would work, but paginator would be updated only on query response. People would expect current page to be updated at once, not after data for the new page arrives. Right now it is achievable by introducing an extra local state to store current page, I think optimistic query would be more elegant.The text was updated successfully, but these errors were encountered: