@rxflow/base
Version:
BaseFlow - 核心 Flow 组件库
18 lines • 838 B
TypeScript
import React from "react";
import { UseBoundStore } from "zustand";
import type { StoreApi } from "zustand/vanilla";
import { BaseStateType, ExtractState } from "../types";
export declare const FlowContext: React.Context<{
useStore?: UseBoundStore<StoreApi<BaseStateType>> | undefined;
}>;
export declare const FlowProvider: React.ComponentType<{
children: React.ReactNode;
}>;
/**
* hooks 创建
* selector 创建
*/
export declare const useSelector: <U>(selector: (state: ExtractState<StoreApi<BaseStateType>>) => U) => U;
export declare const useSetState: () => (partial: BaseStateType | Partial<BaseStateType> | ((state: BaseStateType) => BaseStateType | Partial<BaseStateType>), replace?: boolean | undefined) => void;
export declare const useGetState: () => () => BaseStateType;
//# sourceMappingURL=FlowProvider.d.ts.map