Interface StoreApiWithDevtools<T>

interface StoreApiWithDevtools<T> {
    getState: (() => T);
    getInitialState: (() => T);
    subscribe: ((listener) => (() => void));
    destroy: (() => void);
    setState: NamedSet<T>;
}

Type Parameters

  • T

Hierarchy

  • StoreApi<T>
    • StoreApiWithDevtools

Properties

getState: (() => T)

Type declaration

    • (): T
    • Returns T

getInitialState: (() => T)

Type declaration

    • (): T
    • Returns T

subscribe: ((listener) => (() => void))

Type declaration

    • (listener): (() => void)
    • Parameters

      • listener: ((state, prevState) => void)
          • (state, prevState): void
          • Parameters

            • state: T
            • prevState: T

            Returns void

      Returns (() => void)

        • (): void
        • Returns void

destroy: (() => void)

Type declaration

    • (): void
    • Returns void

Deprecated

Use unsubscribe returned by subscribe

setState: NamedSet<T>