对提交类行为的封装。
Signature:
export declare function useSubmit<TResult>(action: (payload: SubmitActionPayload) => Promise<TResult>, deps: React_2.DependencyList): () => Promise<TResult>;
Parameter | Type | Description |
---|---|---|
action | (payload: SubmitActionPayload) => Promise<TResult> | |
deps | React_2.DependencyList |
Returns:
() => Promise<TResult>