vtils

Home > mp > useSubmit

useSubmit() function

对提交类行为的封装。

Signature:

export declare function useSubmit<TResult>(action: (payload: SubmitActionPayload) => Promise<TResult>, deps: React_2.DependencyList): () => Promise<TResult>;

Parameters

Parameter Type Description
action (payload: SubmitActionPayload) => Promise<TResult>  
deps React_2.DependencyList  

Returns:

() => Promise<TResult>