export default useStore; export type Emitter = object; export type FluxHandler = import("reshow-flux-base/types/createReducer").FluxHandler; export type StoreObject = import("reshow-flux-base").StoreObject; /** * @typedef {object} Emitter */ /** * @template StateType * @template ActionType * @typedef {import("reshow-flux-base/types/createReducer").FluxHandler} FluxHandler */ /** * @template StateType * @template ActionType * @typedef {import("reshow-flux-base").StoreObject} StoreObject */ /** * How to use? * * import { useEffect } from "react"; * import { useStore, ImmutableStore } from "reshow-flux"; * const [store, dispatch] = ImmutableStore(); * const Comp = props => { * const state = useStore(store); * useEffect(()=>dispatch({foo: "bar"}), []); * return
{state.get("foo")}
; * } * * @template StateType * @template ActionType * @param {StoreObject} store * @param {function(Emitter):any} [heeding] * @returns {StateType} */ declare function useStore(store: StoreObject, heeding?: (arg0: Emitter) => any): StateType;