Next safe action onSuccess and onError is not working.
Answered
Spectacled Caiman posted this in #help-forum
Spectacled CaimanOP
I'm trying next safe action, but
onSuccess and onError in not called. Anyone have idea how to solve this? const { execute, isExecuting } = useAction(authCheckRegisteredAction, {
onSuccess: (result) => {
console.log('This not called');
console.log(result.data);
},
onError: (error) => {
console.log('This also not called.');
console.error(error);
}
});1 Reply
Spectacled CaimanOP
It turns out that I need to reload the page first.
Answer