vtils

Home > react > useStaged

useStaged() function

暂存状态。

Signature:

export declare function useStaged<T>(value: T, setValue: (value: T) => void): [
T,
    {
    set: (value: T) => void;
    commit: () => void;
    reset: () => void;
}
];

Parameters

Parameter Type Description
value T  
setValue (value: T) => void  

Returns:

[ T, { set: (value: T) => void; commit: () => void; reset: () => void; } ]