You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: