react-use-ark
Version:
Hook to easily access ARK blockchain Ѧ API in React application
22 lines (21 loc) • 475 B
TypeScript
export declare type State<T> = {
isLoading: boolean;
response: null | T;
error: null | string;
};
declare type Action<T> = {
type: 'FETCHING';
} | {
type: 'SUCCESS';
payload: T;
} | {
type: 'FAILURE';
payload: string;
};
export declare const reducer: <T>() => (state: State<T>, action: Action<T>) => State<T>;
export declare const initialState: {
isLoading: boolean;
error: null;
response: null;
};
export {};