OptionaldelayOptionalimmediateExecute the promise right after the function is invoked. Will apply the delay if any.
When set to false, you will need to execute it manually.
OptionalonCallback when error is caught.
OptionalonCallback when success is caught.
OptionalresetSets the state to initialState before executing the promise.
This can be useful when calling the execute function more than once (for example, to refresh data). When set to false, the current state remains unchanged until the promise resolves.
OptionalthrowAn error is thrown when executing the execute function
Delay for the first execution of the promise when "immediate" is true. In milliseconds.