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
During an action if we want call another action in turn, we can use xxActions.yy.defer()
But if During an action I want to call DataSource function, it will give error "cannot dispatch during an action"
How can I call DataSource function during an action?
The context is
I have a submit button, it should submit data by calling DataSource function, but before submit I wanna validate the data. so when click button, I send an action set the submitted flag and validate all data, if no error, I will call api to submit the data, if has error, won't call submit.
But I got error, Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
The text was updated successfully, but these errors were encountered:
During an action if we want call another action in turn, we can use xxActions.yy.defer()
But if During an action I want to call DataSource function, it will give error "cannot dispatch during an action"
How can I call DataSource function during an action?
The context is
I have a submit button, it should submit data by calling DataSource function, but before submit I wanna validate the data. so when click button, I send an action set the submitted flag and validate all data, if no error, I will call api to submit the data, if has error, won't call submit.
But I got error, Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.
The text was updated successfully, but these errors were encountered: