@rbxts/rodux-hooks
Version:
Port of littensy's roact-rodux-hooked for kampf's RoactHooks library.
15 lines (14 loc) • 694 B
TypeScript
/// <reference types="rodux" />
/// <reference types="roact-hooks" />
import { CoreHooks } from "@rbxts/roact-hooks";
import type { InferStoreAction } from "../types";
import type Rodux from "@rbxts/rodux";
/**
* A hook to access the Rodux Store's `dispatch` method.
*
* @returns Rodux store's `dispatch` method
*/
export declare function useDispatch<A extends Rodux.Action = Rodux.AnyAction>(hooks: CoreHooks): Rodux.Dispatch<A>;
export declare function useDispatch<S extends Rodux.Store<any>>(hooks: CoreHooks): Rodux.Dispatch<InferStoreAction<S>>;
export declare function useDispatch<Dispatch = Rodux.Dispatch<any>>(hooks: CoreHooks): Dispatch;
export default useDispatch;