export default useImmutable; export type ActionObject = import("reshow-flux-base").ActionObject; export type InitStateType = import("reshow-flux-base").InitStateType; /** * @typedef {import("reshow-flux-base").ActionObject} ActionObject */ /** * @template StateType * @typedef {import("reshow-flux-base").InitStateType} InitStateType */ /** * useState alternative but implement by Immutable. * https://reactjs.org/docs/hooks-reference.html#usestate * * * ## Base usage * const [state, setState] = useImmutable(initialState); * * call setState will trigger re-render. * could use setState for partial update. * * @template [StateType=StateMap] * @param {InitStateType} [initialState] * @returns {[StateMap, import("reshow-flux-base").DispatchFunction]} */ declare function useImmutable(initialState?: InitStateType): [StateMap, import("reshow-flux-base").DispatchFunction]; import { StateMap } from "./ImmutableStore";