react-flow-app
Version:
🚀 This is a React.js library to simplify navigations focused in events (user actions) for smooth integrations.
18 lines (17 loc) • 822 B
TypeScript
import { TFlowManagerStartMethodInput, TScreen } from '../../types';
export declare const useFlow: <TScreenInner extends TScreen>(screen?: TScreenInner) => {
back: () => void;
clearHistory: () => void;
dispatch: (name: TScreenInner["actions"][number], payload?: Record<string, any>) => void;
getCurrentStep: () => import("../../types").TStep | undefined;
getHistory: () => string[];
getLastAction: () => import("../../types").TFlowLastAction | undefined;
getPreviousStep: () => import("../../types").TStep | undefined;
hasPreviousStep: () => boolean;
refresh: () => void;
};
export declare const useFlowManager: () => {
currentFlowName: string;
start: ({ flowName, stepName, options }: TFlowManagerStartMethodInput) => void;
clearAllHistory: (flowName?: string) => void;
};