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

hook for optimistic ui updates #146

Open
joshalling opened this issue May 17, 2019 · 0 comments
Open

hook for optimistic ui updates #146

joshalling opened this issue May 17, 2019 · 0 comments

Comments

@joshalling
Copy link

I want to do optimistic updates on a toggle switch while also debouncing the api call. Unfortunately, the logic waits for the debounce timeout before running any code, so I can't to the optimistic update in there. I thought of using thunk to dispatch my optimistic update and then logic action immediately after, but it doesn't feel right to have initial update in my actions and the error revert in my logics.

Is there a current way that I could achieve this with redux-logic?

If not, would it be possible to have a hook that runs before the the debounce timeout?

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

No branches or pull requests

1 participant